{"version":3,"sources":["components/Table/SortableTableHeader.tsx","config/index.ts","redux/reducers/quizzes/tag/tagSlice.ts","features/Classes/api/classes/copyClass.ts","redux/reducers/classes/classesSlice.ts","features/Classes/api/classes/publishClass.ts","features/Classes/api/classes/sendInvite.ts","features/Classes/api/quizzes/getQuizzes.ts","features/Classes/api/documents/index.ts","api/authApi/authApi.ts","redux/reducers/quizzes/quizUser.ts","redux/hooks/index.ts","utils/cacheLS.ts","utils/api.ts","redux/reducers/playlist/articles/articlesSlice.ts","features/Classes/api/playlists/getPlaylistsList.ts","features/Quiz/api/getQuizzes.ts","utils/consts.ts","features/Classes/api/classes/createClass.ts","features/Classes/api/classes/getAllClasses.ts","features/Classes/api/classes/getClass.ts","features/Classes/api/classes/updateClass.ts","hooks/useLeavePageConfirmation.tsx","redux/reducers/playlist/articles/sectionSlice.ts","components/TextEditor/TextEditor.tsx","stores/notifications.ts","features/Institutions/api/getInstitutions.ts","features/Classes/api/classes/shareClass.ts","features/Classes/api/quizzes/deleteQuizFromClass.ts","features/Classes/api/quizzes/addQuizToClass.ts","features/Classes/api/playlists/addPlaylistsToClass.ts","features/Classes/api/playlists/deletePlaylistFromClass.ts","components/ActionButton/index.tsx","features/Classes/api/quizzes/getQuizzesList.ts","utils/helpers.ts","redux/reducers/data.reducer.ts","redux/reducers/playlist/articles/labelSlice.ts","features/Institutions/components/CropModal.tsx","features/Playlists/components/PlaylistForm/AuthorsInfo.tsx","features/Playlists/components/PlaylistForm/VideoListItem.tsx","features/Playlists/components/PlaylistForm/ModalFilter.tsx","features/Playlists/components/PlaylistForm/AddVideoModal.tsx","context/AuthContext.tsx","features/Quiz/api/getTags.ts","features/Quiz/components/DeleteQuizModal/index.tsx","features/Quiz/api/deleteRegularQuiz.ts","features/Quiz/components/QuizListItem/QuizListItem.tsx","features/Quiz/components/ArticlesQuiz/index.tsx","features/Quiz/components/DistributeQuizModal/index.tsx","features/Quiz/components/AdminQuizItem/index.tsx","features/Quiz/components/MyQuiz/index.tsx","features/Quiz/components/SharedQuizItem/index.tsx","features/Quiz/components/SharedQuiz/index.tsx","features/Quiz/components/LeftActivitiesFieldArray/index.tsx","features/Quiz/components/ArticlesListItem.tsx","features/Quiz/components/ArticlesList.tsx","features/Quiz/api/getArticles.ts","features/Quiz/components/ArticlesModal.tsx","features/Quiz/components/LeftCreateQuiz/index.tsx","features/Quiz/components/ImportPlaylist/index.tsx","features/Quiz/components/RightQuizAddButton/index.tsx","features/Quiz/components/QuizCheckboxIcon/index.tsx","components/Form/FileUpload/index.tsx","features/Quiz/components/MoveComponentModal/index.tsx","components/video-container/video-container.tsx","features/Quiz/components/VideoModal/index.tsx","features/Quiz/components/ViewQuizVideoContainer/index.tsx","features/Quiz/components/RightQuizItem/index.tsx","features/Quiz/components/RightQuizItems/index.tsx","features/Quiz/components/PreviewQuizModal/index.tsx","features/Quiz/components/RightQuiz/index.tsx","features/Quiz/components/FormQuiz/index.tsx","features/Quiz/components/CreateQuiz/index.tsx","features/Quiz/components/EditQuiz/index.tsx","features/Quiz/components/ViewQuiz/index.tsx","features/Quiz/components/RebuildQuizModal/index.tsx","features/Quiz/components/QuizLibraryItem/index.tsx","features/Quiz/components/QuizLibrary/index.tsx","features/Quiz/components/AdminQuiz/index.tsx","features/Quiz/components/CustomerQuizItem/index.tsx","features/Quiz/components/CustomerQuiz/index.tsx","features/Quiz/components/CustomerQuizHeaderCard/index.tsx","features/Quiz/components/CustomerResults/index.tsx","features/Quiz/components/CustomerUserResults/index.tsx","features/Quiz/routes/quiz/index.tsx","components/Pagination/PaginationButton.tsx","components/Pagination/index.tsx","redux/reducers/quizzes/quizSlice.ts","redux/reducers/quizzes/quizLibrary.ts","redux/reducers/quizzes/quizAdmin.ts","redux/reducers/quizzes/quizCustomer.ts","components/LoadingSpinner/index.tsx","components/ErrorBlock/index.tsx","components/ErrorBoundary/index.tsx","redux/reducers/playlist/articles/articleToPlaylistSlice.ts","redux/reducers/playlist/playlistReducers.ts","redux/reducers/quizzes/quizzesReducer.ts","redux/reducers/auth.reducer.ts","redux/reducers/rootReducer.ts","redux/store/index.ts","theme/index.tsx","components/Notifications/Notification.tsx","components/Notifications/Notifications.tsx","providers/appProvider.tsx","images/jovelogo.svg","components/Layout/MobileNav.tsx","components/Layout/NavItem.tsx","components/Layout/utils/linkItemsForCSUser.ts","components/Layout/utils/linkItemsForPublishUser.ts","components/Layout/index.tsx","components/Layout/utils/getLinkItemsForSuperAdmin.ts","components/Layout/utils/getLinkItemsForCorporateAdmin.ts","components/Layout/utils/getLinkItems.ts","utils/lazyImport.ts","components/DocViewerPlugin/index.tsx","features/Classes/components/ClassDocuments/ClassDocumentView.tsx","features/Sponsors/api/getSponsorsList.ts","features/Sponsors/api/deleteSponsor.ts","features/Sponsors/Components/DeleteSponsorModal/index.tsx","features/Sponsors/Components/SponsorItem/index.tsx","features/Sponsors/routes/Sponsors.tsx","features/Sponsors/api/updateSponsor.ts","features/Sponsors/api/removeSponsorArticle.ts","features/Sponsors/Components/RemoveSponsorArticleModal/index.tsx","features/Sponsors/Components/SponsorAssignedArticlesListItem/index.tsx","features/Sponsors/api/getSponsorArticles.ts","features/Sponsors/api/addSponsorArticle.ts","features/Sponsors/Components/SponsorAllArticlesListItem/index.tsx","features/Sponsors/Components/SponsorAllArticlesList/index.tsx","features/Sponsors/Components/SponsorAssignArticlesModal/index.tsx","features/Sponsors/Components/SponsorAssignedArticlesList/index.tsx","features/Sponsors/api/addSponsor.ts","features/Sponsors/Components/SponsorForm/index.tsx","features/Sponsors/api/uploadSponsorFiles.ts","features/Sponsors/Components/EditSponsor/index.tsx","features/Sponsors/api/getSponsor.ts","features/Sponsors/Components/AddSponsor/index.tsx","features/Sponsors/routes/index.tsx","features/Translations/api/getTranslationsList.ts","features/Translations/api/deleteTranslation.ts","features/Translations/Components/Translations/Components/DeleteTranslationModal/DeleteTranslationModal.tsx","features/Translations/api/updateTranslation.ts","features/Translations/api/getGroupsList.ts","features/Translations/Utils/languages.tsx","features/Translations/Components/Translations/Components/UpdateTranslationModal/Components/UpdateTranslationForm.tsx","features/Translations/api/addTranslation.ts","features/Translations/Components/Translations/Components/UpdateTranslationModal/UpdateTranslationModal.tsx","features/Translations/Components/Translations/Components/TranslationItem/TranslationItem.tsx","features/Translations/Components/Translations/Translations.tsx","features/Translations/Components/AddTranslation/Components/TranslationForm/TranslationForm.tsx","features/Translations/Components/AddTranslation/AddTranslation.tsx","features/Translations/Components/AddTranslation/Components/TranslationForm/format_TranslationFormData_To_BulkUpload.tsx","features/Translations/api/deleteTranslationGroup.ts","features/Translations/Components/TranslationGroups/Components/DeleteTranslationGroupModal/DeleteTranslationGroupModal.tsx","features/Translations/Components/TranslationGroups/Components/TranslationGroupItem/TranslationGroupItem.tsx","features/Translations/Components/TranslationGroups/TranslationGroups.tsx","features/Translations/api/addTranslationGroup.ts","features/Translations/api/updateTranslationGroup.ts","features/Translations/Components/TranslationGroups/Components/AddTranslationGroup/Components/TranslationForm/TranslationGroupForm.tsx","features/Translations/Components/TranslationGroups/Components/AddTranslationGroup/AddTranslationGroup.tsx","features/Translations/Components/TranslationGroups/Components/UpdateTranslationGroup/UpdateTranslationGroup.tsx","features/Translations/api/getTranslationGroup.ts","features/Translations/routes/index.tsx","features/Banner/api/getLastBanner.ts","components/RHFEditor/RHFEditor.tsx","features/Banner/api/createBanner.ts","features/Banner/utils.ts","features/Banner/components/BannerForm.tsx","features/Banner/api/updateBanner.ts","features/Banner/components/Banner.tsx","features/Banner/routes/index.tsx","routes/protected.tsx","features/Authentication/components/AuthCard.tsx","images/jove-logo-trans.svg","features/Authentication/components/Layout.tsx","features/Authentication/routes/SignIn.tsx","features/Authentication/routes/SetPassword.tsx","features/Admins/api/confirmAdmin.ts","routes/public.tsx","routes/index.tsx","App.tsx","reportWebVitals.ts","index.tsx","features/Playlists/api/index.ts","utils/storage.ts","components/Icon/index.tsx","lib/axios.ts","features/Playlists/components/InstitutionsModal/InstitutionsListItem.tsx","features/Playlists/components/InstitutionsModal/InstitutionsList.tsx","features/Playlists/components/InstitutionsModal/index.tsx","api/qtiApi/index.ts","api/ccApi/index.ts","api/scormApi/index.ts"],"names":["SortableTableHeader","props","value","activeSortDirection","activeSortProperty","handleSortSelect","children","isActive","toLowerCase","cursor","onClick","alignItems","border","className","maxWidth","color","paddingRight","style","paddingLeft","icon","API_URL","window","__CONFIG__","REACT_APP_API_URL","BASE_URL","REACT_APP_BASE_URL","getQuizTags","createAsyncThunk","getTags","tagAdapter","createEntityAdapter","tags","createSlice","name","initialState","getInitialState","total","isLoading","reducers","extraReducers","builder","addCase","pending","state","fulfilled","action","upsertMany","payload","length","rejected","reducer","selectState","quizzes","selectById","selectIds","getSelectors","selectTagById","createSelector","id","entity","selectAllTags","ids","map","Number","filter","isNotNull","selectTagsTotal","getAllClasses","async","_","rejectWithValue","getClasses","error","message","Error","toString","getClassById","getClass","storeNewClass","data","createClass","copyClassById","axios","post","copyClass","editClass","updateClass","classId","publishClassById","patch","publishClass","inviteStudents","params","sendInvite","getPlaylists","getState","currentClass","classes","getClassPlaylists","getClassQuizzes","get","getQuizzes","getDocuments","getDocumentsList","classesAdapter","sortComparer","a","b","classesSlice","deletedClass","isLoadingClass","classPlaylists","playlistVideosCount","classQuizzes","isError","classDocuments","deletedDocument","shareDocument","deleteClassById","removeOne","resetDeletedClass","deleteProfessorDocument","item","deleteCanceledDocument","resetDeletedDocument","setShareDocument","resetShareDocument","deleteClassPlaylist","playlist","setAll","addOne","updateOne","changes","class","playlists","addMatcher","isFulfilled","isPending","isRejected","sliceState","selectAll","selectClasses","classItem","professor","selectSharedClasses","selectCurrentClass","selectPlaylistVideosCount","selectLoading","students","selectLoadingClass","selectError","selectClassPlaylists","selectClassQuizzes","selectClassDocuments","selectDeletedDocument","selectDeletedClass","classesReducer","actions","deleteDocumentById","documentId","isSoft","delete","restoreDocumentById","uploadDocument","ProgressHandler","signal","headers","onUploadProgress","e","then","res","catch","err","updateDocument","getDocumentTokenForProfessor","downloadDocumentByIdForProfessor","responseType","response","loginWithEmailAndPassword","refreshAccessToken","refreshToken","getProfile","getAllQuizzesUser","activePage","activeSearchKeyword","navigation","page","itemsOnPage","totalCount","collection","bool_operator","condition","property","operator","sort","buildQuizLibraryParams","getMyQuizzes","getQuizUserById","getUserQuizById","removeQuizUser","deleteAdminQuizById","createQuizUser","createUserQuiz","editQuizUser","updateUserQuiz","quizUserAdapter","quizUserSlice","pages","totalPages","setQuizUserActivePage","resetQuizUserPages","result","total_items","total_pages","upsertOne","meta","arg","quizUser","selectQuizUserById","selectIdsByPage","useAppDispatch","useDispatch","useAppSelector","useSelector","isLSCacheValid","prevDate","cacheTime","parseFloat","REACT_APP_LS_CACHE_HOURS","isValid","Date","valueOf","keys","Object","localStorage","key","startsWith","removeItem","resetLScache","generateLSKey","language","prefix","globalLanguage","getItem","email","getLSitem","storedItem","obj","JSON","parse","datetime","statusCode","content","fetchSearch","query","contentType","from","to","editEditorCollectionRank","collectionId","fetchArticleByDomainId","domainId","getSectionForSubscription","fetchSectionList","fetchAdminSectionListById","itemsPerPage","searchStr","articlesAdapter","getArticles","getPlaylistArticles","getArticlesByIds","deleteArticle","deletePlaylistArticle","articlesSlice","items_per_page","more","items_on_page","resetArticlesPages","removeAllArticles","removeAll","removeArticle","type","articles","playlistReducer","selectRootState","selectArticlesById","getMyPlaylists","buildQuizzesParams","withAssign","isInteger","postQuizzes","getQuiz","removeTemplateQuiz","createQuiz","updateQuiz","saveQuizImage","uploadQuizQti","getQuizTemplateByArticleId","getQuizLibraryById","removeQuizLibraryById","createQuizLibrary","updateQuizLibrary","getQuizLibrary","getQuizDataByPlaylistId","getSharedQuizzes","getSharedUserQuizzes","getAdminQuizzes","getSharedUsersAdminQuizById","getSharedCustomerQuizById","saveSharedUsersAdminQuizById","saveSharedCustomerQuizById","getAdminQuizById","createAdminQuiz","updateAdminQuiz","getCustomerResults","getCustomerUserResults","deleteQuiz","getQuizResultCSV","FileDownload","updateEndDate","rebuildQuizLibraryById","rebuildSectionQuizLibrary","flowplayerToken","allLanguages","desc","translationApis","default","editorsEmail","translationApiVer","LeavePageConfirmationContext","createContext","onUpdateLeavingState","shouldPreventLeaving","LeavePageConfirmationProvider","setShouldPreventLeaving","useState","useCallback","prev","Provider","useLeavePageConfirmation","shouldPreventLeavingEntry","useContext","useEffect","getSectionSubjectTree","getPlaylistSectionMenu","subjectTree","playlistSectionMenu","Education","title","sectionId","Research","el","Font","Quill","import","Size","whitelist","register","toolbarOptions","toolbarOptionsWithImages","formats","formatsWithImages","TextEditor","onChange","placeholder","withImages","quillRef","useRef","ref","addNotification","useNotificationStore","imageHandler","editor","current","getEditor","input","document","createElement","setAttribute","click","onchange","file","files","test","formData","FormData","append","insertEmbed","getSelection","index","url","codeHandler","querySelectorAll","classList","toggle","modules","useMemo","toolbar","container","handlers","code","modulesWithImages","image","theme","querySelector","innerHTML","create","set","notifications","notification","nanoid","setTimeout","dismissNotification","useInstitutions","isNumber","isApproved","subscription","isRefetch","productId","feature","useQuery","queryKey","queryFn","filterConditions","push","hasSubscription","buildInstitutionsListParams","keepPreviousData","shareClass","useShareClass","closeModalFunction","queryClient","useQueryClient","dispatch","useMutation","onError","onSuccess","refetchQueries","mutationFn","deleteQuizFromClass","quizId","useDeleteQuizFromClass","onMutate","cancelQueries","addQuizToClass","quizzesIds","classIds","useAddQuizToClass","addPlaylistsToClass","playlistsIds","useAddPlaylistsToClass","deletePlaylistFromClass","playlistId","useDeletePlaylistFromClass","ActionButton","linkTo","isInProcess","tooltipTitle","handleClick","height","as","Link","Button","variant","isDisabled","bgColor","_hover","_active","_focus","p","w","minW","hasArrow","label","size","highlightOnHover","useGetQuizzesList","usePostQuizzesList","isModalOpen","useErrorBoundary","status","setServersErrors","setFormError","entries","undefined","buildMyPlaylistParamsWithFilters","isForPlaylists","isSharedWith","activeFilters","buildMyPlaylistParams","filterCondition","processActiveSearchKeyword","parsedId","parseInt","isNaN","split","keyword","buildListParamsWithFilters","isAdminPlaylists","buildListParams","it","Reorder","list","startIndex","endIndex","removed","splice","activity","sortIndex","formatString","str","replaceAll","debounce","func","waitFor","timeout","args","clearTimeout","findIP","Promise","r","RTCPeerConnection","iceServers","createDataChannel","createOffer","c","setLocalDescription","onicecandidate","candidate","match","forEach","getUserAreaDomain","domain","replace","getStructureArticles","child","getParentStructure","activePurpose","activeFieldOfStudy","specialtyItem","domain_id","getTopics","element","articleId","parseText","text","DOMParser","parseFromString","body","textContent","modelShaper","items","shapedArray","videoContentCount","questionOrder","DataSlice","researchId","educationId","joveCoreId","joveScienceId","joveJournalId","encyclopediaId","joveManualId","syllabusId","textBooksId","traditionalResourcesId","openEducationsResourcesId","facultyResourcesId","landingPagesId","ltiId","joveVideoTextbookId","listOfContent","joveCoreList","joveCoreTree","joveScienceEducationList","joveLabManualList","joveLabManualTree","joveEncyclopediaOfExperimentsList","researchSubjectsList","landingPagesList","educationSubjectsList","ltiSubjectsList","initIds","initContentList","initJoveCore","initJoveCoreTree","initScienceEducation","initJoveLabManual","initJoveLabManualTree","initJoveEncyclopediaOfExperiments","initResearchSubjects","initLandingPages","initEducationSubjects","initLtiSubjects","labelAdapter","createLabel","createPlaylistLabel","editLabel","editPlaylistLabel","labelSlice","resetLabels","selectLabelsById","CropModal","isOpen","onClose","submitting","imagePreviewUrl","onSubmit","imgRef","crop","setCrop","unit","width","previewUrl","setPreviewUrl","createCropPreview","canvas","scaleX","naturalWidth","scaleY","naturalHeight","getContext","drawImage","x","y","toDataURL","m","onComplete","src","alt","maxW","mr","disabled","AuthorsInfo","authorsObject","authors","institutions","pt","bg","borderRadius","shadow","fontSize","author","i","rel","lineHeight","letterSpacing","institutionIndexes","institution","arr","departmentTitle","fontWeight","institutionTitle","VideoListItem","video","onSelect","openId","setOpenId","closeModal","searchData","selectedLabel","setIsError","header_image","images","path","inCollection","article_type","pathname","useLocation","isClientHub","includes","setImage","short","large","section","checkSection","subject","subjectTitle","topic","topicTitle","handlerClick","stopPropagation","preventDefault","sessionStorage","setItem","stringify","margin","h","objectFit","mx","flexDir","justifyContent","mb","labManualTitle","spacing","divider","opacity","pos","bottom","zIndex","ModalFilter","setValue","dateFrom","dateTo","setDateFrom","setDateTo","inputText","setInputText","setFrom","React","until","setUntil","sx","px","py","align","justify","_placeholder","target","Icon","gap","selected","date","textDecor","colorScheme","searchInputSchema","yup","shape","AddVideoModal","handleLabelSelect","setImportQuestion","location","editPlaylistSearchData","setActivePage","publicationDateStart","setPublicationDateStart","publicationDateEnd","setPublicationDateEnd","setActiveSubjects","checkAllArr1","checkAllArr2","openAdvancedFilter","setOpenAdvancedFilter","searchValue","pageCount","setPageCount","setTo","setContentType","setTotalPages","totalPagesJournalContent","setTotalPagesJournalContent","totalPagesSciedContent","setTotalPagesSciedContent","setSearchData","journalContent","sciedContent","isAddVideo","getValues","setKeyword","reset","formState","isSubmitting","useForm","resolver","yupResolver","defaultValues","labels","toISOString","slice","isFetching","dataSearch","handleReset","handleSearch","itemsLength","start","end","Math","ceil","pagination","onKeyPress","display","defaultChecked","background","mt","pointerEvents","backgroundColor","boxShadow","defaultValue","outline","my","Pagination","currentPage","handlePagination","scrollIntoView","AuthContext","AuthProvider","user","setUser","authChecked","setAuthChecked","handleAuthCheck","storage","getToken","clearToken","getUser","userRes","handleLogin","password","setToken","token","handleLogout","handleSetPasswordLogin","useAuth","context","DeleteQuizModal","quiz","quizType","deleteQuizMutation","__","invalidateQueries","useDeleteQuiz","selectQuizLoading","shallowEqual","handleDelete","removeQuizLibrary","removeQuizAdmin","deleteTemplateQuiz","removeQuizCustomer","mutate","TextEl","textAlign","QuizListItem","onOpen","useDisclosure","isInstitutionsOpen","onInstitutionsOpen","onInstitutionsClose","setType","downloadType","isQtiLoading","handleQtiDownload","useQti","qtiType","qtiId","isCCLoading","handleCCDownload","usePlaylistCC","ccType","ccId","isScormLoading","handleScormDownload","usePlaylistScorm","scormType","scormId","playlistTitle","InstitutionsModal","dangerouslySetInnerHTML","__html","createdAt","format","countOfQuestions","columnGap","ThEl","textTransform","fontFamily","ArticlesQuiz","selectQuizActivePage","selectQuizTotalPages","selectQuizByPage","selectFile","useFileUpload","toast","useToast","loading","setLoading","handleSubmit","watch","onSearchKeywordSubmit","values","resetQuizPages","setQuizActivePage","getAllQuizzes","onSearchKeywordChange","handlePaginationChange","flex","accept","multiple","Array","isArray","duration","position","LoadingSpinner","borderBottom","DistributeQuizModal","errorMessage","sharedList","isCustomerQuiz","isMyQuiz","isSuperAdmin","roles","enabled","emails","setEmails","isAdminQuiz","handleRemoveClick","newEmails","join","handleInputChange","oldEmails","ErrorBlock","textOnly","alignContent","AdminQuizItem","isUserQuiz","setError","openDistributeQuiz","setOpenDistributeQuiz","handleDistributeQuizClose","handleDistributeQuizOpen","handleDistributeQuizSubmit","already_shared","shared","not_access","not_found","restrictNonInstitutional","endDate","editable","forDelete","MyQuiz","setActiveSearchKeyword","Boolean","SharedQuizItem","sharedUserList","firstName","lastName","first_name","last_name","SharedQuiz","setQuizzes","dataForSuperAdmin","isLoadingSuperAdminData","isErrorSuperAdminData","errorSuperAdminData","LeftActivitiesFieldArray","errors","control","useFormContext","fields","useFieldArray","activities","handleAddActivities","originId","isSelect","handleRemoveActivities","some","newList","handleSelect","pb","borderBottomStyle","borderBottomWidth","borderBottomColor","droppableId","provided","innerRef","draggableId","draggableProps","dragHandleProps","isInvalid","hasOwnProperty","ArticlesListItem","article","onSelectArticle","handleArticleSelect","noOfLines","articleType","ArticlesList","setTotal","articlesData","postQuizzesArticles","bySection","withTemplate","buildQuizzesArticleListParams","ArticlesModal","typeOptions","graded","ungraded","LeftCreateQuiz","isLibrary","isEdit","isFormSubmitting","isAssignSomeone","isOpenArticleModal","onOpenArticleModal","onCloseArticleModal","navigate","useNavigate","tagsOptions","totalTags","quizTemplateTag","tag","isCreatePage","setOpen","setTags","datePickerConfig","placeholderText","dateFormat","showTimeSelect","handleCloseModal","handleOpenModal","handleAddSubject","oldId","handleSaveSubject","handleRemoveArticle","handleBackToQuizzesClick","tabMyQuizzes","leftIcon","htmlFor","required","option","wrap","autoComplete","minDate","filterTime","time","currentDate","selectedDate","getTime","startDate","moment","isAfter","min","ml","rightIcon","sortFunction","ImportPlaylist","indexActivity","totalPlaylists","setTotalPlaylists","playlistsList","setPlaylistsList","defaultPlaylistsList","listItem","importVideos","setImportVideos","importTemplateQuestions","setImportTemplateQuestions","leftList","setLeftList","rightList","setRightList","leftCache","CellMeasurerCache","fixedWidth","rightCache","remove","activityItems","buildPlaylistParams","totalItems","initFormValues","isMultiple","rightAnswer","textOptions","textOption","customTextOptionId","dataTextOption","appendArrayOfItems","quizData","articleData","videoData","prevState","getQuizData","handleAddItemClick","handleRemoveItemClick","reduce","handleSearchKeywordChange","trim","handleImportVideosCheckboxChange","handleImportTemplateQuestionsCheckboxChange","isCentered","autoFocus","left","rowHeight","deferredMeasurementCache","rowCount","rowRenderer","parent","cache","columnIndex","rowIndex","direction","isChecked","RightQuizAddButton","isImportPlaylistOpen","onImportPlaylistOpen","onImportPlaylistClose","importQuestion","isAddVideoOpen","onAddVideoOpen","onAddVideoClose","handleAddVideo","videoId","customItemId","dataItem","indexItem","handleAddPlayListClick","handleImportCheckbox","preState","borderColor","borderWidth","QuizCheckboxIcon","isIndeterminate","rest","FileUpload","invalid","isRequired","onChangeImage","errImageFn","boxSize","MoveComponentModal","sections","setId","handleSectionChange","flowplayer","SpeedPlugin","SubtitlePlugin","ThumbnailsPlugin","HLSPlugin","OVPPlugin","DashPlugin","DRMPlugin","KeyboardPlugin","CuepointsPlugin","GoogleAnalyticsPlugin","VideoContainer","ratio","iconSize","autoPlay","videoSrc","thumbnail","currentTime","isQuizzes","isExperiment","isEoE","videoSubtitles","api","Flowplayer","useFlowplayer","isSmThan750","useMediaQuery","isThumbnailShowing","toggleThumbnail","headerImage","isEducationPlayerPause","setIsEducationPlayerPause","articleVideos","videos","subtitles","play","xhr","XMLHttpRequest","open","send","onload","onprogress","event","lengthComputable","onerror","loadingSubtitle","setOpts","thumbnails","find","tracks","lang","crossorigin","val","iconPlay","fpPlay","education","stateHandler","ev","PAUSE","setProperty","PLAYING","on","off","colorOfHeaderText","headerText","getHeaderTextAndColor","documentElement","videoObjVideo","cdnFile","fpResourceId","metaWidth","metaHeight","pause","top","right","round","togglePlay","transition","overflow","bgImage","bgPos","bgRepeat","bgSize","muted","plugins","speed","options","hls","native","VideoModal","ViewQuizVideoContainer","showCaption","RightQuizItem","isQuizTemplate","replaceItem","activityItem","errorActivityItems","handleMoveOpen","handleMoveClose","handleMoveSubmit","listItems","newActivities","activeIndex","moveItems","handleRemoveTextOption","customId","handleAddTextOptionClick","handleMultipleAnswersClick","checked","handleToggle","handleAddQuestionClick","handleChangeImage","handleErrorImage","padding","startingHeight","in","animateOpacity","videoUrl","videoHash","minH","flexDirection","render","field","errorsTextOption","RightQuizItems","updatedItems","pr","PreviewQuizModal","quizLibraryId","adminQuizId","userQuizId","useParams","tabActivity","setTabActivity","setTextOptions","activitItem","activityId","itemId","timeLimit","hours","floor","minutes","handleTextOptionsChange","activityItemId","activitiesSelect","otherActivities","dataValue","marginLeft","transform","overflowY","maxH","rowGap","toLocaleString","borderLeft","textOptionsSelected","isGraded","RightQuiz","handleCollapseAllClick","itemsList","handleExpandAllClick","marginRight","FormQuiz","memo","setIsSubmitting","dataActivity","methods","mode","replaceItems","onDragEnd","destination","source","alertMessage","hasDuplicates","Set","editQuizLibrary","sortIndexItem","titleItem","originIdItem","errorItem","createNewQuizLibrary","editQuizAdmin","createQuizAdmin","editQuiz","createNewQuiz","CreateQuiz","quizQueryKey","active","updatedAt","isFullScreen","EditQuiz","customerQuizId","ViewQuiz","myQuizId","flexBasis","rebuildSchema","typeError","isAllUpdate","RebuildQuizModal","isOpenConfirmModal","onOpenConfirmModal","onCloseConfirmModal","setTitle","setIsAllUpdate","clearErrors","handleRebuild","ConfirmModal","setIsLoading","QuizLibraryItem","isSectionType","processStatus","actionButtons","link","tooltip","QuizLibrary","selectQuizLibraryActivePage","selectQuizLibraryTotalPages","selectQuizLibraryPage","selectQuizLibraryLoading","isTextbook","setIsTextbook","tabIndex","setTabIndex","keyword_section","resetQuizLibraryPages","setQuizLibraryActivePage","getAllQuizzesLibrary","AdminQuiz","selectQuizAdminActivePage","selectQuizAdminTotalPages","selectQuizAdminPage","selectQuizAdminLoading","resetQuizAdminPages","setQuizAdminActivePage","getAllQuizzesAdmin","CustomerQuizItem","console","log","createdBy","CustomerQuiz","selectQuizCustomerActivePage","selectQuizCustomerTotalPages","selectQuizCustomerPage","selectQuizCustomerLoading","isShowExpired","setIsShowExpired","resetQuizCustomerPages","setQuizCustomerActivePage","getAllCustomerQuizzes","roundToNearest30","ms","CustomerQuizHeaderCard","dateValue","setDateValue","updateTime","setUpdateTime","validateEndDateOnChange","placement","disabledKeyboardNavigation","readOnly","onCalendarOpen","onCalendarClose","alert","onClickOutside","popperPlacement","hide","CustomerResults","downloading","setDownloading","resultsData","resultsIsLoading","quizzesListData","showDownload","assignList","submitAt","handleLinkClick","handleDeadlineChange","end_date","handleDownload","progress","CustomerUserResults","assignId","userResultsData","shapedData","questions","borderTopLeftRadius","borderTopRightRadius","assignedUser","borderRight","dateSubmitted","borderRightColor","score","rightAnswers","question","isCorrectAnswer","pl","userAnswer","userIndexAnswer","correctAnswer","correctIndexAnswer","mixBlendMode","QuizRoutes","useRoutes","quizRoutes","Quizzes","isSmThan900","isArticleQuiz","isLazy","fallback","PaginationButton","isChevron","onPaginationClick","textDecoration","minWidth","getQuizById","quizAdapter","quizSlice","selectQuizById","getLibraryQuizById","quizLibraryAdapter","quizLibrarySlice","quizLibrary","selectQuizLibraryById","getQuizAdminById","editUserQuiz","quizAdminAdapter","quizAdminSlice","quizAdmin","selectQuizAdminById","getCustomerQuizzes","getQuizCustomerById","createQuizCustomer","editQuizCustomer","quizCustomerAdapter","quizCustomerSlice","quizCustomer","selectQuizCustomerById","OverlayLoadingSpinner","ErrorFallback","ErrorBoundary","Component","hasError","componentDidCatch","errorInfo","this","ArticleToPlaylistAdapter","addArticleToPlaylist","dataCheckbox","addArticleToPlaylists","articleToPlaylistSlice","resetArticleToPlaylist","setArticleToPlaylist","getArticleToPlaylist","in_user_playlist","articleToPlaylist","selectArticleToPlaylistsById","combineReducers","authSlice","tabIndexQuiz","isHasUnsavedChanges","setTabIndexQuiz","tab","setIsHasUnsavedChanges","auth","rootReducer","dataReducer","store","configureStore","middleware","getDefaultMiddleware","serializableCheck","extendTheme","fonts","heading","colors","brand","blue","components","baseStyle","variants","_disabled","dashedOutline","playlistSmPreviewBtn","addVideoModalFilter","Tabs","line","_selected","Notification","Notifications","base","md","QueryClient","defaultOptions","queries","refetchOnWindowFocus","retry","AppProvider","baseName","REACT_APP_SERVE_ROUTE_PREFIX","client","basename","MobileNav","Logo","NavItem","role","_groupHover","linkItemsForCSUser","linkItemsForCSLTIUser","LinkItemsForPublishUser","Layout","isNavPanelSmall","setIsNavPanelSmall","handleToggleNavSize","useColorModeValue","SidebarContent","returnFocusOnClose","onOverlayClick","overflowX","adminTranslations","adminBanner","useFlags","isCorporateAdmin","isAdmin","isCSUser","isPublishUser","isCSLTIUser","adminsLinkItems","featureFlags","getLinkItemsForCorporateAdmin","getLinkItems","getAdminsLinkItems","css","lazyImport","factory","module","DocViewerOfficePlugin","mainState","currentDocument","encodeURIComponent","uri","fileTypes","weight","getFileType","extension","MyNoRenderer","MyLoading","OverrideComponent","handleDownloadClick","fileName","fileType","childrens","hasElementPdfZoomIn","hasElementPdfZoomOut","removeChild","elementPdfZoomIn","getElementById","appendChild","elementPdfZoomOut","documentLoading","minHeight","FaFileDownload","ClassDocumentView","documents","setDocuments","getTokenResponse","headerLine","request","getResponseHeader","filename","substring","indexOf","lastIndexOf","fileData","blob","resolve","reader","FileReader","onloadend","readAsDataURL","getDocument","pluginRenderers","TXTRenderer","TIFFRenderer","PNGRenderer","PDFRenderer","JPGRenderer","ImageProxyRenderer","HTMLRenderer","CSVRenderer","BMPRenderer","config","loadingRenderer","overrideComponent","showLoadingTimeout","noRenderer","header","disableFileName","pdfVerticalScrollByDefault","initialActiveDocument","activeDocument","useSponsors","buildSponsorsListParams","deleteSponsor","DeleteSponsorModal","deleteSponsorMutation","useDeleteSponsor","SponsorItem","sponsor","isDeleteOpen","onDeleteOpen","onDeleteClose","companyName","companyUrl","logoUrl","countOfArticles","Sponsors","setActiveSortDirection","setActiveSortProperty","sortVal","updateSponsor","sponsorId","removeSponsorArticle","RemoveSponsorArticleModal","assignedArticle","removeArticleMutation","variables","useRemoveSponsorArticle","SponsorAssignedArticlesListItem","dayjs","useSponsorArticles","isSponsored","withSponsor","buildArticlesParams","addSponsorArticle","SponsorAllArticlesListItem","articleDomainId","articlesList","assignSponsorArticleMutation","String","useAddSponsorArticle","isAssigned","isEditorial","SponsorsAllArticlesList","alignSelf","itemDomain","sponsor_data","SponsorsAssignArticlesModal","SponsorsAssignedArticlesList","addSponsor","sponsorDetailsSchema","URL","SponsorForm","sponsorData","isCreate","isOpenCropModal","onCloseCropModal","onOpenCropModal","uploadImagePreview","setUploadImagePreview","uploadImageFile","setUploadImageFile","uploadImageSubmitting","setUploadImageSubmitting","uploadImageError","setUploadImageError","uploadVideoError","setUploadVideoError","uploadVideoIsLoading","setUploadVideoIsLoading","updateSponsorMutation","updatingCollection","useUpdateSponsor","addSponsorMutation","useAddSponsor","onVideoUpload","allowedTypes","base64String","bstr","atob","n","u8arr","Uint8Array","charCodeAt","File","base64toFile","fileBase64","wordBreak","fileReader","articleList","EditSponsor","entities","getQueryData","getSponsor","AddSponsor","SponsorsRoutes","useTranslations","activeLanguage","buildTranslationsListParams","deleteTranslation","keysToDelete","DeleteTranslationModal","deleteTranslationMutation","useDeleteTranslation","updateTranslation","translationId","useUpdateTranslation","useGroups","languages","translationDetailsSchema","translationEnglishValue","groupId","UpdateTranslationForm","translationKey","previousValue","updateTranslationMutation","selectedLanguage","groups","groupsAreLoading","formIsLoading","fieldsAreDisabled","group","maxLength","addTranslation","useAddTranslation","onSuccessCallback","UpdateTranslationModal","addTranslationMutation","translations","TranslationItem","translation","isUpdateModalOpen","setIsUpdateModalOpen","selectedLanguageHovered","setSelectedLanguageHovered","setSelectedLanguage","selectedTranslationId","setSelectedTranslationId","selectedGroupId","setSelectedGroupId","selectedKey","setSelectedKey","onTranslationHover","en","groupTitle","onMouseEnter","translationIdsByLanguage","onMouseLeave","Translations","setActiveLanguage","groupedData","acc","thereAreGroups","emptyGroupsTooltipMessage","onBlur","cn","de","es","kr","fr","colSpan","TranslationForm","AddTranslation","format_TranslationFormData_To_BulkUpload","deleteTranslationGroup","DeleteTranslationGroupModal","useDeleteTranslationGroup","TranslationGroupItem","TranslationGroups","addTranslationGroup","useAddTranslationGroup","updateTranslationGroup","useUpdateTranslationGroup","translationGroupSchema","TranslationGroupForm","groupData","addTranslationGroupMutation","updateTranslationGroupMutation","AddTranslationGroup","UpdateTranslationGroup","TranslationsRoutes","useGetLastBanner","CustomToolbar","borderTopStartRadius","borderTopEndRadius","persist","me","RHFEditor","html","clipboard","matchVisual","createBanner","BANNER_TYPES","BannerForm","banner","setMode","schema","isPublished","isDirty","useWatch","published","updateBanner","messageText","innerText","BannerContainer","Banner","BannerRoutes","MethodsCollectionsRoutes","PlaylistsRoutes","LtiRoutes","ClassesRoutes","AdminsRoutes","InstitutionsRoutes","ProductClassesRoutes","AdminClientHubRoutes","ClientHubPlaylistsRoutes","IdentityProvidersRoutes","FRCRoutes","PublishRoutes","DashboardRoutes","MoEngageRoutes","App","protectedRoutes","protectedRoutesForSuperAdmin","protectedRoutesForCSUser","protectedRoutesForPublishUser","AuthCard","AuthLayout","LogoWhite","authSchema","SignIn","plainPassword","first","second","oneOf","SetPassword","tokenChecked","setTokenChecked","handleCheckToken","searchParams","search","tokenStr","substr","publicRoutes","AppRoutes","routes","withLDProvider","clientSideID","process","REACT_APP_LD_CLIENTSIDE_ID","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","StrictMode","storagePrefix","cookie","Cookies","secure","output","letter","toUpperCase","iconName","charAt","FontAwesomeIcon","baseIcons","Axios","baseURL","authTokenRequest","resetAuthTokenRequest","interceptors","use","accessToken","authorization","Accept","responseURL","originalRequest","_retry","isBefore","refreshTokenExpiredAt","reload","reject","InstitutionsListItem","handleProviderInstitutionId","handleAssignInstitutionId","institutionId","setInstitutionId","typeLabel","InstitutionsList","isEducationSubscription","setIsEducationSubscription","isUnlimitedSubscription","setIsUnlimitedSubscription","isLoadingInstitutions","institutionsData","getQti","responseObj","origin","Blob","getPlaylistCC","getQuizScorm"],"mappings":"8HAAA,yCA6CeA,IA3BcC,IACzB,MAAM,MAACC,EAAK,oBAAEC,EAAmB,mBAAEC,EAAkB,iBAAEC,EAAgB,SAAEC,GAAYL,EAC/EM,EAAWH,EAAmBI,gBAAkBN,EAAMM,cAC5D,OACI,cAAC,IAAE,CACCC,OAAO,UACPC,QAAS,IAAML,EAAiBH,GAAO,SAEvC,eAAC,IAAI,CACDS,WAAW,SACXC,OAAO,OACPC,UAAU,4BACVC,SAAS,QACTC,MAAOR,EAAW,WAAa,UAAU,UAE3C,cAAC,IAAG,CAACS,aAAc,MAAM,SACpBV,IAEH,cAAC,IAAI,CACDW,MAAO,CAAEC,YAAa,OACtBC,KAAOZ,GAAoC,QAAxBJ,EAAiC,WAAa,mBAGxE,C,kCCzCb,oEAAO,MAAMiB,EAAUC,OAAOC,WAAWC,kBAC5BC,EAAWH,OAAOC,WAAWG,kB,mCCD1C,6KAOO,MAAMC,EAAcC,YAAiB,wBAAwB,IAAMC,sBAEpEC,EAAaC,cA6BNC,EAtBIC,YAAY,CAC3BC,KAAM,OACNC,aAAcL,EAAWM,gBAAuB,CAC9CC,MAAO,EACPC,WAAW,IAEbC,SAAU,CAAC,EACXC,cAAgBC,IACdA,EAAQC,QAAQf,EAAYgB,SAAUC,IACpCA,EAAMN,WAAY,CAAI,IAExBG,EAAQC,QAAQf,EAAYkB,WAAW,CAACD,EAAOE,KAC7ChB,EAAWiB,WAAWH,EAAOE,EAAOE,SACpCJ,EAAMP,MAAQS,EAAOE,QAAQC,OAC7BL,EAAMN,WAAY,CAAK,IAEzB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port {\n Th,\n Flex,\n Text,\n Box\n} from '@chakra-ui/react';\n\nimport Icon from '@/components/Icon';\n\ntype Props = {\n value: string,\n activeSortProperty: string,\n activeSortDirection: string,\n handleSortSelect: (value: string) => void,\n children: React.ReactNode;\n}\n\nconst SortableTableHeader = (props : Props) => {\n const {value, activeSortDirection, activeSortProperty, handleSortSelect, children} = props;\n const isActive = activeSortProperty.toLowerCase() === value.toLowerCase();\n return (\n
handleSortSelect(value)}\n >\n \n \n {children}\n \n \n \n | \n );\n};\n\nexport default SortableTableHeader;\n","export const API_URL = window.__CONFIG__.REACT_APP_API_URL;\nexport const BASE_URL = window.__CONFIG__.REACT_APP_BASE_URL;","import { createAsyncThunk, createEntityAdapter, createSelector, createSlice } from '@reduxjs/toolkit';\nimport { isNotNull } from '@/utils/helpers';\nimport { getTags, Tag } from '@/features/Quiz';\nimport { RootState } from '../../../store';\n\nexport type TagType = Tag;\n\nexport const getQuizTags = createAsyncThunk('quiz/tag/getQuizTags', () => getTags());\n\nconst tagAdapter = createEntityAdapter();\n\ntype State = {\n total: number;\n isLoading: boolean;\n};\n\nconst tagSlice = createSlice({\n name: 'tags',\n initialState: tagAdapter.getInitialState({\n total: 0,\n isLoading: false,\n }),\n reducers: {},\n extraReducers: (builder) => {\n builder.addCase(getQuizTags.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(getQuizTags.fulfilled, (state, action) => {\n tagAdapter.upsertMany(state, action.payload);\n state.total = action.payload.length;\n state.isLoading = false;\n });\n builder.addCase(getQuizTags.rejected, (state) => {\n state.isLoading = false;\n });\n },\n});\n\nexport const tags = tagSlice.reducer;\n\nconst selectState = (state: RootState) => state.quizzes.tags;\n\nexport const { selectById, selectIds } = tagAdapter.getSelectors(selectState);\n\nconst selectRootState = (state: RootState) => state;\n\nexport const selectTagById = createSelector(\n [(state: RootState, id: number | null) => (id ? selectById(state, id) ?? null : null)],\n (entity) => entity\n);\nexport const selectAllTags = createSelector([selectIds, selectRootState], (ids, state) =>\n ids.map((id) => selectTagById(state, Number(id))).filter(isNotNull)\n);\nexport const selectTagsTotal = createSelector([selectState], (state) => state.total);\nexport const selectTagsLoading = createSelector([selectState], (state) => state.isLoading);\n","import { axios } from \"@/lib/axios\";\nimport {ClassItem} from \"@/features/Classes/types\";\n\nexport const copyClass = (id: number): Promise => {\n return axios.post(`/api/admin/class/${id}`);\n}\n","import { createClass } from '@/features/Classes/api/classes/createClass';\nimport { getAllClasses as getClasses } from '@/features/Classes/api/classes/getAllClasses';\nimport { getClass } from '@/features/Classes/api/classes/getClass';\nimport { updateClass } from '@/features/Classes/api/classes/updateClass';\nimport { getDocumentsList } from '@/features/Classes/api/documents';\nimport { getClassPlaylists } from '@/features/Classes/api/playlists/getPlaylistsList';\nimport { ClassQuizzes, getQuizzes } from '@/features/Classes/api/quizzes/getQuizzes';\nimport { sendInvite } from '@/features/Classes/api/classes/sendInvite';\nimport {\n ClassCreateData,\n ClassDocument,\n ClassInviteData,\n ClassItem,\n ClassItemResponse,\n ClassPlaylistsResponse,\n ClassUpdateData,\n PlaylistListItemData,\n} from '@/features/Classes/types';\n\nimport {\n createAsyncThunk,\n createEntityAdapter,\n createSelector,\n createSlice,\n isFulfilled,\n isPending,\n isRejected,\n PayloadAction,\n} from '@reduxjs/toolkit';\nimport { RootState } from '../../store';\nimport { copyClass } from '@/features/Classes/api/classes/copyClass';\nimport { publishClass } from '@/features/Classes/api/classes/publishClass';\n\ntype State = {\n deletedClass: null | number;\n currentClass: ClassItem | null;\n classPlaylists: {\n playlist: PlaylistListItemData;\n addedById: number;\n originId: number | null;\n playlistId: number;\n }[];\n playlistVideosCount: {\n [key: number]: number;\n }[];\n classQuizzes: ClassQuizzes | null;\n isError: boolean;\n isLoading: boolean;\n isLoadingClass: boolean;\n classDocuments: ClassDocument[] | null | void;\n deletedDocument: null | number;\n shareDocument: null | { url: string; email: string };\n};\n\nconst getAllClasses = createAsyncThunk<\n ClassItem[],\n void,\n {\n state: RootState;\n rejectWithValue: string;\n }\n>('classes/getAllClasses', async (_, { rejectWithValue }) => {\n try {\n return await getClasses();\n } catch (error: any) {\n let message = '';\n if (error instanceof Error) {\n message = error.message || error.toString();\n }\n\n return rejectWithValue(message);\n }\n});\n\nconst getClassById = createAsyncThunk(\n 'classes/getClassById',\n async (id, { rejectWithValue }) => {\n try {\n return await getClass(id);\n } catch (error: any) {\n let message = '';\n if (error instanceof Error) {\n message = error.message || error.toString();\n }\n\n return rejectWithValue(message);\n }\n }\n);\n\nconst storeNewClass = createAsyncThunk('classes/storeClass', (data: ClassCreateData) => createClass(data));\n\nconst copyClassById = createAsyncThunk('classes/copyClass', (id: number) => copyClass(id));\n\nconst editClass = createAsyncThunk('classes/updateClass', ({ id, data }: { id: number; data: ClassUpdateData }) =>\n updateClass({ classId: id, data: data })\n);\n\nconst publishClassById = createAsyncThunk('classes/publishClass', (id: number) => publishClass(id));\n\nconst inviteStudents = createAsyncThunk('classes/inviteStudents', (params: { id: number; data: ClassInviteData }) => sendInvite(params.id, params.data));\n\nexport const getPlaylists = createAsyncThunk<\n ClassPlaylistsResponse | null | void,\n number,\n {\n state: RootState;\n rejectWithValue: string;\n }\n>('classes/getClassPlaylists', async (classId, { getState, rejectWithValue }) => {\n const { currentClass } = getState().classes;\n if (currentClass) {\n try {\n return await getClassPlaylists(classId);\n } catch (error) {\n let message = '';\n if (error instanceof Error) {\n message = error.message || error.toString();\n }\n return rejectWithValue(message);\n }\n }\n});\n\nexport const getClassQuizzes = createAsyncThunk('classes/getQuizzes', async (classId, { rejectWithValue }) => {\n try {\n return await getQuizzes(classId);\n } catch (error) {\n let message = '';\n if (error instanceof Error) {\n message = error.message || error.toString();\n }\n return rejectWithValue(message);\n }\n});\n\nexport const getDocuments = createAsyncThunk<\n ClassDocument[] | null | void,\n number,\n {\n state: RootState;\n rejectWithValue: string;\n }\n>('classes/getDocuments', async (classId, { rejectWithValue }) => {\n try {\n return await getDocumentsList(classId);\n } catch (error) {\n let message = '';\n if (error instanceof Error) {\n message = error.message || error.toString();\n }\n return rejectWithValue(message);\n }\n});\n\nconst classesAdapter = createEntityAdapter({\n sortComparer: (a, b) => b.id - a.id,\n});\n\nconst classesSlice = createSlice({\n name: 'classesSlice',\n initialState: classesAdapter.getInitialState({\n deletedClass: null,\n currentClass: null,\n isLoadingClass: false,\n classPlaylists: [],\n playlistVideosCount: [],\n classQuizzes: null,\n isError: false,\n isLoading: false,\n classDocuments: [],\n deletedDocument: null,\n shareDocument: null,\n }),\n reducers: {\n deleteClassById: (state, action: PayloadAction<{ id: number; }>) => {\n classesAdapter.removeOne(state, action.payload.id);\n state.deletedClass = action.payload.id;\n },\n resetDeletedClass: (state) => {\n state.deletedClass = null;\n },\n deleteProfessorDocument: (state, action) => {\n state.classDocuments = state.classDocuments?.filter((item) => item.id !== action.payload);\n state.deletedDocument = action.payload;\n },\n deleteCanceledDocument: (state, action: PayloadAction) => {\n state.classDocuments = state.classDocuments?.filter((item) => item.id !== action.payload);\n },\n resetDeletedDocument: (state) => {\n state.deletedDocument = null;\n },\n setShareDocument: (state, action: PayloadAction<{ url: string; email: string }>) => {\n state.shareDocument = action.payload;\n },\n resetShareDocument: (state) => {\n state.shareDocument = null;\n },\n deleteClassPlaylist: (state, action) => {\n state.classPlaylists = state.classPlaylists?.filter((item) => item.playlist.id !== action.payload);\n },\n },\n extraReducers: (builder) => {\n builder\n .addCase(getAllClasses.fulfilled, (state, action) => {\n classesAdapter.setAll(state, action.payload);\n state.isLoading = false;\n })\n .addCase(storeNewClass.fulfilled, (state, action) => {\n classesAdapter.addOne(state, action.payload);\n state.isLoading = false;\n })\n .addCase(editClass.fulfilled, (state, { payload }) => {\n if (payload.id === state.currentClass?.id) {\n state.currentClass = {\n ...state.currentClass,\n ...payload,\n };\n }\n classesAdapter.updateOne(state, { id: payload.id, changes: payload });\n state.isLoading = false;\n })\n .addCase(getClassById.pending, (state) => {\n state.isLoadingClass = true;\n })\n .addCase(getClassById.fulfilled, (state, action) => {\n state.currentClass = action.payload.class;\n state.isLoadingClass = false;\n })\n .addCase(getClassById.rejected, (state) => {\n state.isLoadingClass = false;\n })\n .addCase(getPlaylists.fulfilled, (state, action) => {\n state.classPlaylists = action.payload?.playlists ?? [];\n state.playlistVideosCount = action.payload?.playlistVideosCount ?? [];\n state.isLoading = false;\n })\n .addCase(getClassQuizzes.fulfilled, (state, action) => {\n state.classQuizzes = action.payload;\n state.isLoading = false;\n state.isError = false;\n })\n .addCase(getClassQuizzes.rejected, (state) => {\n state.isLoading = false;\n state.isError = true;\n })\n .addCase(getDocuments.fulfilled, (state, action) => {\n state.classDocuments = action.payload;\n state.isLoading = false;\n })\n .addMatcher(isFulfilled, (state) => {\n state.isLoading = false;\n })\n .addMatcher(isPending, (state) => {\n state.isLoading = true;\n })\n .addMatcher(isRejected, (state) => {\n state.isLoading = false;\n });\n },\n});\n\n// selectors\nconst sliceState = (state: RootState) => state.classes;\nconst { selectAll, selectById } = classesAdapter.getSelectors(sliceState);\n\nconst selectClasses = createSelector(selectAll, (classes) => classes.filter((classItem) => !classItem.professor));\nconst selectSharedClasses = createSelector(selectAll, (classes) => classes.filter((classItem) => !!classItem.professor));\nconst selectCurrentClass = createSelector(sliceState, (state) => state.currentClass);\nconst selectPlaylistVideosCount = createSelector(sliceState, (state) => state.playlistVideosCount);\nconst selectStudentInCurrentClass = createSelector(sliceState, (state) => state.currentClass?.students);\nconst selectLoading = createSelector(sliceState, (state) => state.isLoading);\nconst selectLoadingClass = createSelector(sliceState, (state) => state.isLoadingClass);\nconst selectError = createSelector(sliceState, (state) => state.isError);\nconst selectClassPlaylists = createSelector(sliceState, (state) => state.classPlaylists);\nconst selectClassQuizzes = createSelector(sliceState, (state) => state.classQuizzes);\nconst selectClassDocuments = createSelector(sliceState, (state) => state.classDocuments);\nconst selectDeletedDocument = createSelector(sliceState, (state) => state.deletedDocument);\n\nconst selectDeletedClass = createSelector(sliceState, (state) => state.deletedClass);\nconst selectShareDocument = createSelector(sliceState, (state) => state.shareDocument);\n\nexport const classesReducer = classesSlice.reducer;\nexport const {\n deleteClassById,\n resetDeletedClass,\n deleteClassPlaylist,\n deleteProfessorDocument,\n deleteCanceledDocument,\n resetDeletedDocument,\n setShareDocument,\n resetShareDocument,\n} = classesSlice.actions;\n\nexport {\n editClass,\n getAllClasses,\n getClassById,\n copyClassById,\n publishClassById,\n inviteStudents,\n selectClasses,\n selectClassPlaylists,\n selectSharedClasses,\n selectCurrentClass,\n selectPlaylistVideosCount,\n selectStudentInCurrentClass,\n selectLoading,\n selectLoadingClass,\n selectError,\n selectClassQuizzes,\n selectClassDocuments,\n selectDeletedDocument,\n selectDeletedClass,\n selectShareDocument,\n storeNewClass,\n};\n","import { axios } from \"@/lib/axios\";\nimport { ClassItem } from \"@/features/Classes/types\";\n\nexport const publishClass = (id: number): Promise => {\n return axios.patch(`/api/admin/class/${id}/publish`);\n}; \n","import { axios } from \"@/lib/axios\";\nimport { ClassInviteData } from '@/features/Classes/types';\n\nexport const sendInvite = async (classId: number, data: ClassInviteData) => {\n return axios.post(`api/admin/class/${classId}/invite`, data);\n};","import { API_URL } from \"@/config\";\nimport { axios } from \"@/lib/axios\";\nimport { Quiz } from \"@/types\";\n\nexport type ClassQuizzes = {\n [key: number]: {\n id: number;\n quiz: Quiz;\n };\n added_by: number;\n origin: null | number;\n}[];\n\nexport const getQuizzes = (classId: number): Promise => {\n return axios.get(`${API_URL}/api/admin/class/${classId}/quiz`);\n}\n","import { API_URL } from \"@/config\";\nimport { ClassDocument, ClassPatchDocumentData, ClassUploadDocumentData } from '@/features/Classes/types';\nimport { axios } from \"@/lib/axios\";\nimport { AxiosResponse } from 'axios';\n\nexport const getDocumentsList = (classId: number): Promise => {\n return axios.get(`${API_URL}/api/admin/class/${classId}/document`);\n};\n\nexport const deleteDocumentById = (classId: number, documentId: number, isSoft?: 1 | 0): Promise => {\n return axios.delete(`${API_URL}/api/admin/class/${classId}/document/${documentId}?isSoft=${isSoft ?? 1}`);\n};\n\nexport const restoreDocumentById = (classId: number, documentId: number): Promise => {\n return axios.post(`${API_URL}/api/admin/class/${classId}/document/${documentId}`);\n};\n\nexport const uploadDocument = (\n classId: number,\n data: ClassUploadDocumentData | FormData,\n ProgressHandler: (e: any) => void,\n signal?: AbortSignal\n): Promise => {\n return axios\n .post(`${API_URL}/api/admin/class/${classId}/document`, data, {\n headers: { 'Content-Type': 'multipart/form-data' },\n ...(signal ? { signal: signal } : {}),\n onUploadProgress: (e) => ProgressHandler(e),\n })\n .then((res) => res)\n .catch((err) => {\n throw err;\n });\n};\n\nexport const updateDocument = (classId: number, documentId: number, data: ClassPatchDocumentData): Promise => {\n return axios.patch(`${API_URL}/api/admin/class/${classId}/document/${documentId}`, data);\n};\n\nexport const getDocumentTokenForProfessor = (classId: number, documentId: number): Promise<{ token: string }> => {\n return axios.get(`${API_URL}/api/admin/class/${classId}/document/${documentId}/token`);\n};\n\nexport const downloadDocumentByIdForProfessor = (classId: number, documentId: number): Promise => {\n return axios.get(`${API_URL}/api/admin/class/${classId}/document/${documentId}/file`, { responseType: 'blob' }).then((response) => {\n return response;\n });\n};","import { API_URL } from \"@/config\";\nimport { axios } from '@/lib/axios';\n\nimport { TokenResponse, AuthProfile } from '@/types';\n\nexport type LoginCredentialsDTO = {\n email: string;\n password: string;\n};\n\nexport const loginWithEmailAndPassword = (data: LoginCredentialsDTO): Promise => {\n return axios.post(`${API_URL}/api/admin/security/get_access_token`, data);\n};\n\nexport const refreshAccessToken = (refreshToken: string): Promise => {\n return axios.post(`${API_URL}/api/admin/security/refresh_access_token`, {refreshToken});\n};\n\nexport const getProfile = (): Promise => {\n return axios.get(`${API_URL}/api/admin/profile`);\n};\n","import { createAsyncThunk, createEntityAdapter, createSelector, createSlice } from '@reduxjs/toolkit';\nimport { isNotNull } from '@/utils/helpers';\nimport { RootState } from '../../store';\nimport {\n createUserQuiz,\n deleteAdminQuizById,\n getUserQuizById,\n getMyQuizzes,\n updateUserQuiz,\n} from '@/features/Quiz/api/getQuizzes';\nimport {\n CreateQuizLibraryData,\n QuizLibrary,\n QuizLibraryResponse, SaveQuizError,\n UpdateQuizLibraryData,\n} from '@/features/Quiz/types';\nimport { PayloadAction } from '@reduxjs/toolkit/dist/createAction';\n\nexport type QuizUserType = QuizLibrary;\n\nexport const buildQuizLibraryParams = (activePage: number, activeSearchKeyword?: string | number) => {\n return {\n navigation: {\n page: activePage,\n itemsOnPage: 20\n },\n totalCount: true,\n filter: {\n collection: [\n ...(activeSearchKeyword ? [\n {\n bool_operator: 'and',\n condition: {\n property: 'title',\n operator: 'contains',\n value: activeSearchKeyword ?? 0\n }\n }\n ] : []\n ),\n ]\n },\n sort: [\n [\n 'title',\n 'asc'\n ]\n ]\n }\n}\n\nexport const getAllQuizzesUser = createAsyncThunk<\n QuizLibraryResponse,\n {\n activePage: number;\n activeSearchKeyword?: string | number;\n },\n {\n rejectValue: string;\n }\n>(\n 'quizzes/getAllQuizzesUser',\n async ({activePage, activeSearchKeyword}) => {\n const data = buildQuizLibraryParams(activePage, activeSearchKeyword);\n\n return await getMyQuizzes(data);\n });\n\nexport const getQuizUserById = createAsyncThunk(\n 'quizzes/getQuizUserById',\n (id: number) => getUserQuizById(id)\n);\n\nexport const removeQuizUser = createAsyncThunk(\n 'quizzes/removeQuizUser',\n (id: number) => deleteAdminQuizById(id)\n);\n\n\nexport const createQuizUser = createAsyncThunk<\n QuizLibrary,\n CreateQuizLibraryData,\n {\n rejectValue: SaveQuizError;\n }\n>(\n 'quizzes/createQuizUser',\n async (data, { rejectWithValue }) => {\n return await createUserQuiz(data).catch((res) => rejectWithValue(res));\n }\n);\n\nexport const editQuizUser = createAsyncThunk<\n QuizLibrary,\n {\n id: number;\n data: UpdateQuizLibraryData;\n },\n {\n rejectValue: SaveQuizError;\n }\n>('quizzes/editQuizUser', async ({ id, data }, { rejectWithValue }) => {\n return await updateUserQuiz(id, data).catch((res) => rejectWithValue(res));\n});\n\nconst quizUserAdapter = createEntityAdapter();\n\ntype State = {\n pages: Record;\n activePage: number;\n total: number;\n totalPages: number;\n isLoading: boolean;\n};\n\nconst quizUserSlice = createSlice({\n name: 'quizUser',\n initialState: quizUserAdapter.getInitialState({\n pages: {},\n activePage: 1,\n totalPages: 1,\n total: 0,\n isLoading: false,\n }),\n reducers: {\n setQuizUserActivePage: (state, action: PayloadAction) => {\n state.activePage = action.payload;\n },\n resetQuizUserPages: (state) => {\n state.pages = {};\n },\n },\n extraReducers: (builder) => {\n builder.addCase(getAllQuizzesUser.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(getAllQuizzesUser.fulfilled, (state, action) => {\n quizUserAdapter.upsertMany(state, action.payload.result);\n state.pages[action.payload.navigation.page ?? 1] = action.payload.result.map((item) => item.id);\n state.total = action.payload.navigation.total_items;\n state.activePage = action.payload.navigation.page;\n state.totalPages = action.payload.navigation.total_pages;\n state.isLoading = false;\n });\n builder.addCase(getAllQuizzesUser.rejected, (state) => {\n state.isLoading = false;\n });\n builder.addCase(getQuizUserById.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(getQuizUserById.fulfilled, (state, action) => {\n quizUserAdapter.upsertOne(state, action.payload);\n state.isLoading = false;\n });\n builder.addCase(getQuizUserById.rejected, (state) => {\n state.isLoading = false;\n });\n builder.addCase(removeQuizUser.fulfilled, (state, action) => {\n quizUserAdapter.removeOne(state, action.meta.arg);\n });\n builder.addCase(createQuizUser.fulfilled, (state, action) => {\n quizUserAdapter.upsertOne(state, action.payload);\n });\n\n builder.addCase(editQuizUser.fulfilled, (state, action) => {\n quizUserAdapter.upsertOne(state, action.payload);\n });\n },\n});\n\nexport const quizUser = quizUserSlice.reducer;\nexport const { resetQuizUserPages, setQuizUserActivePage } = quizUserSlice.actions;\n\nconst selectState = (state: RootState) => state.quizzes.quizUser;\n\nexport const { selectById, selectIds } = quizUserAdapter.getSelectors(selectState);\n\nconst selectRootState = (state: RootState) => state;\n\nexport const selectQuizUserById = createSelector(\n [(state: RootState, id: number | null) => (id ? selectById(state, id) ?? null : null)],\n (entity) => entity\n);\n\nconst selectIdsByPage = createSelector(\n [selectState, (_: RootState, page: number) => page],\n (state, page) => state.pages[page] ?? []\n);\n\nexport const selectQuizUserPage = createSelector(\n [selectRootState, (state: RootState, page: number) => selectIdsByPage(state, page)],\n (state, ids) => ids.map((id) => selectQuizUserById(state, id)).filter(isNotNull)\n);\n\nexport const selectQuizUserActivePage = createSelector([selectState], (state) => state.activePage);\nexport const selectQuizUserTotalPages = createSelector([selectState], (state) => state.totalPages);\nexport const selectQuizUserTotal = createSelector([selectState], (state) => state.total);\nexport const selectQuizUserLoading = createSelector([selectState], (state) => state.isLoading);\n","import { AnyAction, Dispatch, ThunkDispatch } from '@reduxjs/toolkit';\nimport { useDispatch, useSelector, TypedUseSelectorHook } from 'react-redux';\nimport type { RootState, AppDispatch } from \"../store\";\n\nexport const useAppDispatch = (): ThunkDispatch & Dispatch => useDispatch();\nexport const useAppSelector: TypedUseSelectorHook = useSelector;\n","export function resetLScache() {\n const keys = Object.keys(localStorage);\n for (let key of keys) {\n if (key.startsWith('tree') || key.startsWith('list')) localStorage.removeItem(key);\n }\n}\n\nexport function isLSCacheValid(prevDate: string) {\n const cacheTime = parseFloat(window.__CONFIG__.REACT_APP_LS_CACHE_HOURS || '0');\n const interval = (new Date().valueOf() - new Date(prevDate).valueOf()) / 1000 / 3600;\n const isValid = interval < cacheTime;\n if (!isValid) resetLScache();\n return isValid;\n}\n\nexport function generateLSKey(language: string, id: number | string = 0, prefix: string = '') {\n const globalLanguage = localStorage.getItem('global-language') || 'en';\n const email = localStorage.getItem('email') || '';\n return `${prefix}-${email}-${globalLanguage}-${language}-${id}`;\n}\n\nexport function getLSitem(key: string) {\n const storedItem = localStorage.getItem(key);\n if (storedItem) {\n const obj = JSON.parse(storedItem);\n if (obj && isLSCacheValid(obj.datetime) && +obj.statusCode === 200) {\n return obj.content;\n }\n }\n\n return;\n}\n","import { API_URL } from \"@/config\";\nimport { axios } from '@/lib/axios';\nimport { generateLSKey, getLSitem } from '@/utils/cacheLS';\nimport { ListContextById, SectionsType, ListContext } from '@/types';\n\nexport const fetchSearch = (query: string | null, contentType: string, page: number, from: string | null, to: string | null): Promise => {\n return axios.get(`${API_URL}/api/free/search/?query=${query}&content_type=${contentType}&page=${page}&from=${from}&to=${to}`);\n};\n\nexport const editEditorCollectionRank = (collectionId: number, id: number, data: { rank: number }) => {\n return axios.patch(`${API_URL}/api/admin/collections/${collectionId}/editor/${id}`, data);\n};\n\nexport const fetchArticleByDomainId = (language: string, domainId: number | string): Promise => {\n return axios.get(`${API_URL}/api/free/article/${language}/${domainId}`);\n};\n\nexport const fetchSectionListById = (language: string, id: number | string, page?: number, itemsPerPage?: number): Promise => {\n const searchStr = `${page || itemsPerPage ? '?' : ''}${page ? `page=${page}&` : ''}${itemsPerPage ? `items_per_page=${itemsPerPage}` : ''}`;\n const lsKey = generateLSKey(language, id, 'list-' + searchStr);\n return getLSitem(lsKey) || axios.get(`${API_URL}/api/free/section/list/${language}/${id}${searchStr}`);\n};\n\nexport const getSectionForSubscription = (): Promise => {\n return axios.get(`${API_URL}/api/section_subscription`);\n};\n\nexport const fetchSectionList = (language: string): Promise => {\n const lsKey = generateLSKey(language, 0, 'list');\n return getLSitem(lsKey) || axios.get(`${API_URL}/api/free/section/list/${language}`);\n};\n\nexport const fetchAdminSectionListById = (id: number | string, page?: number, itemsPerPage?: number): Promise => {\n const searchStr = `${page || itemsPerPage ? '?' : ''}${page ? `page=${page}&` : ''}${itemsPerPage ? `items_per_page=${itemsPerPage}` : ''}`;\n return axios.get(`/api/admin/section/list/${id}${searchStr}`);\n};\n","import { createSlice, createEntityAdapter, createAsyncThunk, createSelector, PayloadAction } from '@reduxjs/toolkit';\nimport {\n deletePlaylistArticle,\n getPlaylistArticles,\n} from '../../../../features/Playlists/api';\nimport { RootState } from '../../../store';\nimport { isNotNull } from '../../../../utils/helpers';\nimport {\n PlaylistArticleSectionPath,\n PlaylistArticlesResponse,\n PlaylistLabelResponse,\n GetListBodyStructure\n} from '../../../../features/Playlists';\n\ntype AuthorsType = {\n id?: number;\n firstName?: string | null;\n lastName?: string | null;\n email?: string | null;\n institutionName?: string | null;\n fullName?: string;\n};\n\ntype ArticleAuthorsType = {\n author: AuthorsType;\n id: number;\n order: number;\n}\n\nexport type AdapterArticle = {\n overviewContent: string;\n videos: Record<'en', {\n id: number;\n locale: string;\n cdnFile: string;\n fileIdentifier: string;\n }>,\n authors: ArticleAuthorsType[],\n images: {\n large: string;\n short: string;\n };\n sectionPath: PlaylistArticleSectionPath[];\n id: number;\n title: string;\n titleDescription: string;\n titleImage: string;\n headerDescription: string;\n headerImage: string;\n isActive: boolean;\n type: string;\n inCollection: boolean;\n}\n\ntype ArticlesState = {\n page: Record;\n items_per_page: number;\n more: boolean;\n items_on_page: number;\n total_pages: number;\n total_items: number;\n isLoading: boolean;\n isError: boolean;\n};\n\nconst articlesAdapter = createEntityAdapter();\n\nexport const getArticles = createAsyncThunk(\n 'playlist/articles/getPlaylistArticles',\n async (data, { rejectWithValue }) => {\n try {\n return await getPlaylistArticles(data);\n } catch (error) {\n let message = '';\n if (error instanceof Error) {\n message = error.message ||\n error.toString();\n }\n\n return rejectWithValue(message);\n }\n\n });\n\nexport const getArticlesByIds = createAsyncThunk(\n 'playlist/articles/getPlaylistArticlesByIds',\n async (data, { rejectWithValue }) => {\n try {\n return await getPlaylistArticles(data);\n } catch (error) {\n let message = '';\n if (error instanceof Error) {\n message = error.message ||\n error.toString();\n }\n\n return rejectWithValue(message);\n }\n });\n\nexport const deleteArticle = createAsyncThunk(\n 'playlist/articles/deletePlaylistArticle',\n async (id, { rejectWithValue }) => {\n try {\n return await deletePlaylistArticle(id);\n } catch (error) {\n let message = '';\n if (error instanceof Error) {\n message = error.message ||\n error.toString();\n }\n\n return rejectWithValue(message);\n }\n });\n\nconst articlesSlice = createSlice({\n name: 'articles',\n initialState: articlesAdapter.getInitialState({\n page: {},\n items_per_page: 9,\n more: true,\n items_on_page: 9,\n total_pages: 1,\n total_items: 1,\n isLoading: false,\n isError: false,\n }),\n reducers: {\n resetArticlesPages: (state) => {\n state.page = {};\n },\n removeAllArticles: (state) => {\n articlesAdapter.removeAll(state);\n },\n removeArticle: (state, action) => {\n articlesAdapter.removeOne(state, action.payload);\n },\n },\n extraReducers: {\n [getArticles.pending.type]: (state) => {\n state.isLoading = true;\n state.isError = false;\n },\n [getArticles.fulfilled.type]: (state, action: PayloadAction) => {\n articlesAdapter.upsertMany(state, action.payload.result);\n state.page[action.meta.arg.navigation.page] = action.payload.result.map((item) => item.id);\n state.isLoading = false;\n state.items_per_page = action.payload.navigation.items_per_page;\n state.more = action.payload.navigation.more;\n state.items_on_page = action.payload.navigation.items_on_page;\n if (action.payload.navigation.total_pages && action.payload.navigation.total_items) {\n state.total_pages = action.payload.navigation.total_pages;\n state.total_items = action.payload.navigation.total_items;\n }\n state.isError = false;\n },\n [getArticles.rejected.type]: (state) => {\n state.isLoading = false;\n state.isError = true;\n },\n [getArticlesByIds.pending.type]: (state) => {\n state.isLoading = true;\n state.isError = false;\n },\n [getArticlesByIds.fulfilled.type]: (state, action: PayloadAction) => {\n articlesAdapter.upsertMany(state, action.payload.result);\n state.isLoading = false;\n state.isError = false;\n },\n [deleteArticle.rejected.type]: (state) => {\n state.isLoading = false;\n state.isError = true;\n },\n [deleteArticle.pending.type]: (state) => {\n state.isLoading = true;\n state.isError = false;\n },\n [deleteArticle.fulfilled.type]: (state) => {\n state.isLoading = false;\n state.isError = true;\n },\n },\n});\n\nexport const articles = articlesSlice.reducer;\nexport const { resetArticlesPages, removeArticle, removeAllArticles } = articlesSlice.actions;\nconst selectState = (state: RootState) => state.playlistReducer.articles;\nexport const { selectById, selectIds } = articlesAdapter.getSelectors(selectState);\nconst selectRootState = (state: RootState) => state;\n\nexport const selectArticlesById = createSelector(\n [selectRootState, (state: RootState, id: number | null) => (id ? selectById(state, id) ?? null : null)],\n (_, entity) => entity,\n);\nexport const selectArticlesByIds = createSelector(\n [selectRootState, (state: RootState, ids: number[] | null) => ids],\n (state, ids) => {\n if (!ids) {\n return [];\n }\n return ids.map((id) => selectArticlesById(state, id)).filter(isNotNull);\n },\n);\n\nconst selectIdsByPage = createSelector(\n [selectState, (_: RootState, page: number) => page],\n (state, page) => state.page[page] ?? [],\n);\n\nexport const selectArticlesByPage = createSelector(\n [selectRootState, (state: RootState, page: number) => selectIdsByPage(state, page)],\n (state, ids) => ids.map((id) => selectArticlesById(state, id)).filter(isNotNull),\n);\n\nexport const selectArticlesLoading = createSelector([selectState], (state) => state.isLoading);\nexport const selectArticlesTotalPages = createSelector([selectState], (state) => state.total_pages);\nexport const selectArticlesTotalItems = createSelector([selectState], (state) => state.total_items);\n\n\n\n","import { axios } from \"@/lib/axios\";\nimport { useQuery } from \"react-query\";\nimport { ClassPlaylistsResponse, PlaylistListItemData } from '../../types';\nimport { GetListBodyStructure, GetListParams } from \"@/types\";\nimport { PlaylistsResponse } from \"@/features/Playlists\";\n\ntype GetPlaylistsData = {\n navigation: {\n items_per_page: number,\n page: number,\n more: boolean,\n items_on_page: number\n },\n result: PlaylistListItemData[]\n}\n\nexport const getClassPlaylists = (classId: number): Promise => {\n return axios.get(`/api/admin/class/${classId}/playlist`);\n};\n\nconst getPlaylistsList = (): Promise => {\n return axios.post('/api/admin/playlist/list');\n}\n\nexport const getPlaylists = (data: GetListBodyStructure): Promise => {\n return axios.post('/api/admin/class/playlist_list', data);\n};\n\nexport const getMyPlaylists = (data: GetListBodyStructure): Promise => {\n return axios.post('/api/admin/class/my_playlist_list', data);\n};\n\nexport const useGetPlaylistsList = () => {\n return useQuery({\n queryKey: ['playlistsList'],\n queryFn: () => getPlaylistsList(),\n })\n}\n\nconst buildPlaylistParams = (totalItems: number, activeSearchKeyword: string | number) => {\n return {\n navigation: {\n page: 1,\n itemsOnPage: totalItems,\n },\n totalCount: true,\n filter: {\n collection: [\n ...(activeSearchKeyword\n ? [\n {\n bool_operator: 'or',\n condition: {\n property: 'title',\n operator: 'contains',\n value: activeSearchKeyword ?? 0,\n },\n },\n ]\n : []),\n ],\n },\n sort: [['created_at', 'desc']],\n };\n};\n\nexport const usePlaylists = ({activePage, activeSearchKeyword, activeSortDirection, activeSortProperty} : GetListParams) => {\n return useQuery({\n queryKey: ['playlists', activePage, activeSearchKeyword, activeSortDirection, activeSortProperty],\n queryFn: () => {\n let params = buildPlaylistParams(activePage, activeSearchKeyword);\n return getPlaylists(params)\n },\n keepPreviousData: true\n });\n};\n","import { axios } from '@/lib/axios';\nimport { QuizzesResponse, CreateQuizData, UpdateQuizData, QuizLibraryResponse, ImportPlaylistResponse, QuizLibrary, ShareResponse } from '../types';\n\nimport { EndDate, Quiz, RebuildSectionQuizLibraryData, UserResultsResponse } from '@/types';\n\nimport { GetListBodyStructure } from '@/types';\nimport { API_URL } from '@/config';\nimport FileDownload from 'js-file-download';\n\nexport const buildQuizzesParams = (\n activePage: number,\n activeSearchKeyword: string | number,\n withAssign: boolean | null = false,\n itemsOnPage = 20\n) => {\n return {\n navigation: {\n page: activePage,\n itemsOnPage,\n },\n totalCount: true,\n filter: {\n collection: [\n ...(activeSearchKeyword\n ? [\n {\n bool_operator: 'or',\n condition: {\n property: Number.isInteger(activeSearchKeyword) ? 'id' : 'title',\n operator: Number.isInteger(activeSearchKeyword) ? 'equals' : 'contains',\n value: Number.isInteger(activeSearchKeyword) ? activeSearchKeyword : activeSearchKeyword || '',\n },\n },\n ]\n : []),\n ],\n },\n sort: [['id', 'desc']],\n withAssign,\n };\n};\n\nexport const postQuizzes = (data: GetListBodyStructure): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/template_list`, data);\n};\n\nexport const getQuiz = (id: number): Promise => {\n return axios.get(`${API_URL}/api/admin/quiz/template/${id}`);\n};\n\nexport const removeTemplateQuiz = (id: number): Promise => {\n return axios.delete(`${API_URL}/api/admin/quiz/template/${id}`);\n};\n\nexport const createQuiz = (data: CreateQuizData): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/template/create`, data);\n};\n\nexport const updateQuiz = (id: number, data: UpdateQuizData): Promise => {\n return axios.patch(`${API_URL}/api/admin/quiz/template/${id}`, data);\n};\n\nexport const saveQuizImage = (data: FormData): Promise<{ url: string }> => {\n return axios.post(`${API_URL}/api/quiz/upload_image`, data);\n};\n\nexport const uploadQuizQti = (data: FormData) => {\n return axios.post(`${API_URL}/api/admin/quiz/template/from_package/qti`, data);\n};\n\nexport const getQuizTemplateByArticleId = (id: number): Promise => {\n return axios.get(`${API_URL}/api/admin/quiz/from_article/${id}`);\n};\n\nexport const getQuizLibraryById = (id: number): Promise => {\n return axios.get(`${API_URL}/api/admin/quiz/library/${id}`);\n};\n\nexport const removeQuizLibraryById = (id: number): Promise => {\n return axios.delete(`${API_URL}/api/admin/quiz/library/${id}`);\n};\n\nexport const createQuizLibrary = (data: CreateQuizData): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/library/create`, data);\n};\n\nexport const updateQuizLibrary = (id: number, data: UpdateQuizData): Promise => {\n return axios.patch(`${API_URL}/api/admin/quiz/library/${id}`, data);\n};\n\nexport const getQuizLibrary = (data: GetListBodyStructure): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/library_quiz_list`, data);\n};\n\nexport const getQuizDataByPlaylistId = (id: number): Promise => {\n return axios.get(`${API_URL}/api/admin/quiz/from_playlist/${id}`);\n};\n\nexport const getSharedQuizzes = (data: GetListBodyStructure): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/shared_quiz_list`, data);\n};\n\nexport const getSharedUserQuizzes = (): Promise => {\n return axios.get(`${API_URL}/api/admin/quiz/list_shared_by_me`);\n};\n\nexport const getMyQuizzes = (data: GetListBodyStructure): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/user_quiz_list`, data);\n};\nexport const getAdminQuizzes = (data: GetListBodyStructure): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/quiz_list`, data);\n};\n\nexport const deleteAdminQuizById = (id: number): Promise => {\n return axios.delete(`${API_URL}/api/admin/quiz/${id}`);\n};\n\nexport const getSharedUsersAdminQuizById = (\n id: number\n): Promise<{\n id: number;\n sharedList?: {\n user: {\n id: number;\n email: string;\n firstName: string;\n lastName: string;\n };\n }[];\n assignList?: {\n user: {\n id: number;\n email: string;\n firstName: string;\n lastName: string;\n };\n }[];\n}> => {\n return axios.get(`${API_URL}/api/admin/quiz/shared_with/${id}`);\n};\n\nexport const getSharedCustomerQuizById = (\n id: number\n): Promise<{\n id: number;\n sharedList?: {\n user: {\n id: number;\n email: string;\n firstName: string;\n lastName: string;\n };\n }[];\n assignList?: {\n user: {\n id: number;\n email: string;\n firstName: string;\n lastName: string;\n };\n }[];\n}> => {\n return axios.get(`${API_URL}/api/admin/quiz/shared_with_customer/${id}`);\n};\n\nexport const saveSharedUsersAdminQuizById = (\n id: number,\n data: {\n emails: string[];\n isAdminQuiz?: boolean;\n }\n): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/share/${id}`, data);\n};\n\nexport const saveSharedCustomerQuizById = (\n id: number,\n data: {\n emails: string[];\n }\n): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/sharecustomer/${id}`, data);\n};\n\nexport const getAdminQuizById = (id: number): Promise => {\n return axios.get(`${API_URL}/api/admin/quiz/${id}`);\n};\n\nexport const createAdminQuiz = (data: CreateQuizData): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/create`, data);\n};\n\nexport const updateAdminQuiz = (id: number, data: UpdateQuizData): Promise => {\n return axios.patch(`${API_URL}/api/admin/quiz/${id}`, data);\n};\n\nexport const getUserQuizById = (id: number): Promise => {\n return axios.get(`${API_URL}/api/admin/quiz/user_quiz/${id}`);\n};\n\nexport const createUserQuiz = (data: CreateQuizData): Promise => {\n return axios.post(`${API_URL}/api/quiz/create`, data);\n};\n\nexport const updateUserQuiz = (id: number, data: UpdateQuizData): Promise => {\n return axios.patch(`${API_URL}/api/admin/quiz/user_quiz/${id}`, data);\n};\n\nexport const getCustomerResults = (id: string): Promise => {\n return axios.get(`${API_URL}/api/admin/quiz/user_quiz/${id}/assign`);\n};\n\nexport const getCustomerUserResults = (id: string): Promise => {\n return axios.get(`${API_URL}/api/admin/quiz/assign/${id}`);\n};\n\nexport const deleteQuiz = (id: number): Promise => {\n return axios.delete(`${API_URL}/api/admin/quiz/user_quiz/${id}`);\n};\n\nexport const getQuizResultCSV = (id: string): Promise => {\n return axios.get(`${API_URL}/api/admin/quiz/user_quiz/${id}/assign?format=csv`, { responseType: 'blob' }).then((response) => {\n FileDownload(response.data, `${id}_results.csv`);\n });\n};\n\nexport const updateEndDate = (id: number, data: EndDate): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/set_end_date/${id}`, data);\n};\n\nexport const rebuildQuizLibraryById = (id: number): Promise => {\n return axios.get(`${API_URL}/api/admin/quiz/update_section_quiz_library/${id}`);\n};\n\nexport const rebuildSectionQuizLibrary = (data: RebuildSectionQuizLibraryData): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/process_section_quiz_libraries`, data);\n};\n","export const flowplayerToken =\n 'eyJraWQiOiJZRjk0UDlMM0phTzUiLCJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJjIjoie1wiYWNsXCI6NixcImlkXCI6XCJZRjk0UDlMM0phTzVcIn0iLCJpc3MiOiJGbG93cGxheWVyIn0.GwJk8dFr3gmm7wBniq0FjDGKq2p6B9OEnYYBKG-roi6SjcF7G8ljbXmEfwwRWDmWNY_3oMJEuun3w-UGUQWb0g';\n\nexport const allLanguages: { key: string; name: string; desc: string }[] = [\n { key: 'en', name: 'English', desc: 'English' },\n { key: 'de', name: 'Deutsch', desc: 'German' },\n { key: 'ru', name: 'Русский', desc: 'Russian' },\n { key: 'fr', name: 'Français', desc: 'French' },\n { key: 'es', name: 'Español', desc: 'Spanish' },\n { key: 'pt-br', name: 'Português', desc: 'Portuguese (Brazilian)' },\n { key: 'tr', name: 'Türkçe', desc: 'Turkish' },\n { key: 'it', name: 'Italiano', desc: 'Italian' },\n { key: 'hb', name: 'עִבְרִית', desc: 'Hebrew' },\n { key: 'nl', name: 'Nederlands', desc: 'Dutch' },\n { key: 'ja', name: '日本語', desc: 'Japanese' },\n { key: 'kr', name: '한국어', desc: 'Korean' },\n { key: 'cn', name: '中文', desc: 'Chinese' },\n { key: 'ar', name: 'العربية', desc: 'Arabic' },\n { key: 'hi', name: 'हिंदी', desc: 'Hindi' },\n { key: 'no', name: 'norsk', desc: 'Norwegian' },\n { key: 'sv', name: 'svenska', desc: 'Swedish' },\n { key: 'da', name: 'dansk', desc: 'Danish' },\n { key: 'pl', name: 'Polski', desc: 'Polish' },\n];\n\nexport const translationApis: { key: string, name: string, default?: boolean|null }[] = [\n { key: 'chatgpt', name: 'ChatGPT', default: true }\n]\n\nexport const editorsEmail: { key: string, name: string, default?: boolean|null }[] = [ \n { key: 'benjaminwerth', name: 'benjamin.werth@jove.com' },\n { key: 'ethanzhang', name: 'ethan.zhang@jove.com' },\n { key: 'sourikmondal', name: 'sourik.mondal@jove.com' },\n { key: 'balamurugankuppan', name: 'balamurugan.kuppan@jove.com' },\n { key: 'ednageorge', name: 'edna.george@jove.com' },\n { key: 'shalinisanyal', name: 'shalini.sanyal@jove.com' },\n { key: 'nupurfangaria', name: 'nupur.fangaria@jove.com' },\n { key: 'neethuabraham', name: 'neethu.abraham@jove.com' },\n { key: 'jasmeetsahni', name: 'jasmeet.sahni@jove.com' },\n { key: 'shivanibhagat', name: 'shivani.bhagat@jove.com' },\n { key: 'tasaduqwani', name: 'tasaduq.wani@jove.com' },\n { key: 'adityaroy', name: 'aditya.roy@jove.com' },\n { key: 'titusthankachan', name: 'titus.thankachan@jove.com' },\n { key: 'dharasachdev', name: 'dhara.sachdev@jove.com' },\n { key: 'ashnaali', name: 'ashna.ali@jove.com' },\n { key: 'keertichauhan', name: 'keerti.chauhan@jove.com' },\n { key: 'swathikesh', name: 'swathi.kesh@jove.com'},\n]\n\nexport const translationApiVer: { key: string, name: string, default?: boolean|null }[] = [\n { key: 'gpt-3.5-turbo-16k', name: 'GPT-3.5 [16k] (Recommended)', default: true },\n { key: 'gpt-4', name: 'GPT-4 [8k]' }\n]\n","import { API_URL } from \"@/config\";\nimport { axios } from \"@/lib/axios\";\nimport { useNotificationStore } from \"@/stores/notifications\";\nimport { useMutation, useQueryClient } from \"react-query\";\nimport { useNavigate } from 'react-router-dom';\nimport { ClassCreateData, ClassItem } from \"../../types\";\n\nexport const createClass = (data: ClassCreateData): Promise => {\n return axios.post(`${API_URL}/api/admin/class/`, data);\n}\n\nexport const useCreateClass = () => {\n const { addNotification } = useNotificationStore();\n const navigate = useNavigate();\n const queryClient = useQueryClient();\n\n return useMutation({\n onError: () => {\n addNotification({\n type: 'error',\n title: 'Unable to create Class',\n });\n },\n onSuccess: (res) => {\n queryClient.refetchQueries(['classes']);\n addNotification({\n type: 'success',\n title: 'Class successfully created',\n });\n navigate(`/classes/${res.id}`);\n },\n mutationFn: createClass,\n })\n}","import { API_URL } from \"@/config\";\nimport { useQuery } from 'react-query';\nimport { axios } from '@/lib/axios';\nimport { ClassItem } from '../../types';\n\nexport const getAllClasses = (): Promise => {\n return axios.get(`${API_URL}/api/admin/class/`);\n};\n\nexport const useAllClasses = (userId?: { userId: number | undefined }) => {\n return useQuery({\n queryKey: ['classes', userId],\n queryFn: () => getAllClasses(),\n keepPreviousData: true,\n });\n};\n","import { API_URL } from \"@/config\";\nimport {useQuery} from 'react-query';\nimport { axios } from \"@/lib/axios\";\nimport { ClassItemResponse } from '../../types';\n\nexport const getClass = (classId: number): Promise => {\n return axios.get(`${API_URL}/api/admin/class/${classId}`);\n};\n\nexport const useClass = (classId: number, tabIndex?: number) => {\n return useQuery({\n queryKey: ['getClass', classId, { tabIndex: 0 }],\n queryFn: () => getClass(classId),\n keepPreviousData: true,\n });\n};\n","import { API_URL } from \"@/config\";\nimport { axios } from \"@/lib/axios\";\nimport { useNotificationStore } from \"@/stores/notifications\";\nimport { useMutation, useQueryClient } from \"react-query\";\nimport { ClassItem, ClassUpdateData } from \"../../types\";\n\ntype UpdateData = {\n classId: number;\n data: ClassUpdateData;\n}\n\nexport const updateClass = ({ classId, data }: UpdateData): Promise => {\n return axios.patch(`${API_URL}/api/admin/class/${classId}`, data);\n}\n\nexport const useUpdateClass = () => {\n const { addNotification } = useNotificationStore();\n const queryClient = useQueryClient();\n\n return useMutation({\n onMutate: async ({ classId }: UpdateData) => {\n await queryClient.cancelQueries(['getClass', classId]);\n },\n onError: (error: any) => {\n const title = error.message || 'Unable to update Class'\n addNotification({\n type: 'error',\n title\n });\n },\n onSuccess: (classItem) => {\n queryClient.refetchQueries(['getClass', classItem.id]);\n queryClient.refetchQueries(['classes']);\n },\n mutationFn: updateClass,\n })\n}","import React, { createContext, useState, useContext, useEffect, PropsWithChildren, useCallback } from 'react';\n\ninterface LeavePageConfirmationContextType {\n onUpdateLeavingState: (value: boolean) => void;\n shouldPreventLeaving: boolean;\n}\n\nconst LeavePageConfirmationContext = createContext({\n onUpdateLeavingState: () => { },\n shouldPreventLeaving: false,\n});\n\nexport const LeavePageConfirmationProvider: React.FC> = ({ children }) => {\n const [shouldPreventLeaving, setShouldPreventLeaving] = useState(false);\n const onUpdateLeavingState = useCallback(\n (state: boolean) =>\n setShouldPreventLeaving((prev) => {\n if (state === prev) return prev;\n return state;\n }),\n []\n );\n\n return (\n \n {children}\n \n );\n};\n\nexport const useLeavePageConfirmation = (\n shouldPreventLeavingEntry?: boolean,\n) => {\n const { onUpdateLeavingState, shouldPreventLeaving } = useContext(LeavePageConfirmationContext);\n\n useEffect(() => {\n if (typeof shouldPreventLeavingEntry !== 'undefined') {\n onUpdateLeavingState(shouldPreventLeavingEntry);\n }\n return () => onUpdateLeavingState(false);\n }, [shouldPreventLeavingEntry]);\n\n\n return { shouldPreventLeaving };\n};\n","import { createAsyncThunk, createSlice, PayloadAction, createSelector } from '@reduxjs/toolkit';\nimport { getPlaylistSectionMenu } from '../../../../features/Playlists/api';\nimport { RootState } from '../../../store';\nimport { PlaylistSectionSubject } from '../../../../features/Playlists';\n\ntype SubjectTreeState = {\n playlistSectionMenu: PlaylistSectionSubject;\n isLoading: boolean;\n isError: boolean;\n}\n\nexport const getSectionSubjectTree = createAsyncThunk(\n 'playlist/articles/getSectionMenu',\n () => getPlaylistSectionMenu());\n\nconst sectionSubjectTree = createSlice({\n name: 'getSectionMenu',\n initialState: {\n playlistSectionMenu: {\n Education: [{title: '',\n sectionId: 1}],\n Research: [{title: '',\n sectionId: 1}]\n },\n isLoading: false,\n isError: false,\n },\n reducers:{},\n extraReducers: {\n [getSectionSubjectTree.pending.type]: (state) => {\n state.isLoading = true;\n state.isError = false;\n },\n [getSectionSubjectTree.fulfilled.type]: (state, action: PayloadAction) => {\n state.playlistSectionMenu = action.payload;\n state.isLoading = false;\n state.isError = false;\n },\n [getSectionSubjectTree.rejected.type]: (state) => {\n state.isLoading = false;\n state.isError = true;\n },\n }\n})\n\nexport const subjectTree = sectionSubjectTree.reducer;\n\nconst selectState = (state: RootState) => state.playlistReducer.subjectTree;\n\nexport const selectSectionSubjectsEducation= createSelector([selectState], el => el.playlistSectionMenu.Education);\nexport const selectSectionSubjectsResearch= createSelector([selectState], el => el.playlistSectionMenu.Research);\n\n\n","import React, { useRef, useMemo } from \"react\";\nimport ReactQuill, { Quill } from \"react-quill\";\nimport \"react-quill/dist/quill.snow.css\";\nimport \"./style.css\";\nimport { saveQuizImage } from \"@/features/Quiz/api/getQuizzes\";\nimport { useNotificationStore } from \"@/stores/notifications\";\n\nlet Font = Quill.import(\"attributors/style/font\");\nlet Size = Quill.import(\"attributors/style/size\");\nSize.whitelist = [ \"11px\", \"12px\", \"13px\", \"14px\", \"15px\", \"16px\", \"17px\", \"18px\", \"19px\", \"20px\", \"22px\", \"24px\", \"26px\"];\nFont.whitelist = [ \"Roboto\", \"serif\", \"monospace\", \"Ubuntu Mono\", \"Raleway\",];\n\nQuill.register(Font, true);\nQuill.register(Size, true);\n\nconst toolbarOptions = [\n [{ 'font': Font.whitelist }, 'bold', 'italic', 'underline', 'strike'],\n ['blockquote'],\n [{'list': 'ordered'}, {'list': 'bullet'}],\n [{'indent': '-1'}, {'indent': '+1'}],\n [\"link\", \"formula\"],\n [{'color': []}, {'background': []}],\n [{'align': []}],\n ['clean', 'code'],\n [{ 'size': Size.whitelist }],\n];\n\nconst toolbarOptionsWithImages = [\n [{ 'font': Font.whitelist }, 'bold', 'italic', 'underline', 'strike'],\n ['blockquote'],\n [{'list': 'ordered'}, {'list': 'bullet'}],\n [{'indent': '-1'}, {'indent': '+1'}],\n [\"link\", \"image\", \"formula\"],\n [{'color': []}, {'background': []}],\n [{'align': []}],\n ['clean', 'code'],\n [{ 'size': Size.whitelist }],\n];\n\nconst formats = [\n 'header', 'font', 'background', 'color', 'code', 'size', 'height',\n 'bold', 'italic', 'underline', 'strike', 'blockquote', 'float',\n 'list', 'bullet', 'indent', 'script', 'align', 'direction',\n 'link', 'code-block', 'formula', 'width',\n 'style', 'size', 'code',\n];\n\nconst formatsWithImages = [\n 'header', 'font', 'background', 'color', 'code', 'size', 'height',\n 'bold', 'italic', 'underline', 'strike', 'blockquote', 'float',\n 'list', 'bullet', 'indent', 'script', 'align', 'direction',\n 'link', 'code-block', 'formula', 'width',\n 'style', 'size', 'image', 'code',\n];\n\ntype EditorProps = {\n value: string;\n onChange: (value: (((prevState: string) => string) | string)) => void;\n placeholder: string;\n withImages?: boolean;\n}\n\nconst TextEditor = ({ value, onChange, placeholder, withImages = false }: EditorProps) => {\n const quillRef = useRef();\n const ref = useRef();\n const { addNotification } = useNotificationStore();\n\n const imageHandler = (e: any) => {\n const editor = quillRef.current.getEditor();\n const input = document.createElement(\"input\");\n input.setAttribute(\"type\", \"file\");\n input.setAttribute(\"accept\", \"image/*\");\n input.click();\n\n input.onchange = async () => {\n const file = input?.files && input.files[0];\n if (file && /^image\\//.test(file.type)) {\n const formData = new FormData();\n formData.append(\"file\", file);\n\n const res = await saveQuizImage(formData);\n\n editor.insertEmbed(editor.getSelection().index, \"image\", res?.url);\n } else {\n addNotification({\n type: \"error\",\n title: \"You could only upload images.\"\n });\n }\n };\n };\n\n const codeHandler = () => {\n ref.current?.querySelectorAll('.output-html')[0]?.classList.toggle('hide');\n }\n\n const modules = useMemo(() => ({\n toolbar: {\n container: toolbarOptions,\n handlers: {\n code: codeHandler,\n }\n }\n }), []);\n\n const modulesWithImages = useMemo(() => ({\n toolbar: {\n container: toolbarOptionsWithImages,\n handlers: {\n image: imageHandler,\n code: codeHandler,\n },\n },\n }), []);\n\n return (\n \n
\n
\n \n {ref.current?.querySelector('.ql-editor')?.innerHTML}\n
\n
\n
\n );\n};\n\nexport default TextEditor;\n","import { nanoid } from 'nanoid';\nimport create from 'zustand';\n\nexport type TNotification = {\n id: string;\n type: 'info' | 'warning' | 'success' | 'error';\n title: string;\n message?: string;\n};\n\ntype NotificationsStore = {\n notifications: TNotification[];\n addNotification: (notification: Omit) => void;\n dismissNotification: (id: string) => void;\n};\n\nexport const useNotificationStore = create((set) => ({\n notifications: [],\n addNotification: (notification) => {\n let id = nanoid()\n set((state) => ({\n notifications: [...state.notifications, {id, ...notification}],\n }))\n setTimeout(() => {\n set((state) => ({\n notifications: state.notifications.filter((notification) => notification.id !== id),\n }))\n }, 4000);\n },\n dismissNotification: (id) =>\n set((state) => ({\n notifications: state.notifications.filter((notification) => notification.id !== id),\n })),\n}));\n","import { useQuery } from 'react-query';\nimport { API_URL } from \"@/config\";\n\nimport { axios } from '@/lib/axios';\n\nimport { InstitutionResponse } from '../types';\nimport { GetListBodyStructure, GetListParams, InstitutionSubscriptionTypes } from '@/types';\n\nexport const buildInstitutionsListParams = (\n activePage: number,\n activeSearchKeyword: string | number,\n activeSortDirection: string,\n activeSortProperty: string,\n isNumber?: boolean,\n isApproved?: boolean,\n subscription?: InstitutionSubscriptionTypes,\n productId?: number | null,\n feature?: string | null,\n) => {\n const filterConditions = [];\n\n if (activeSearchKeyword) {\n filterConditions.push({\n bool_operator: 'and',\n condition: {\n property: isNumber || Number.isInteger(activeSearchKeyword) ? 'id' : 'title',\n operator: isNumber || Number.isInteger(activeSearchKeyword) ? 'equals' : 'contains',\n value: isNumber || Number.isInteger(activeSearchKeyword)\n ? Number(activeSearchKeyword)\n : activeSearchKeyword || '',\n }\n });\n }\n\n if (isApproved) {\n filterConditions.push({\n bool_operator: 'and',\n condition: {\n property: 'approved',\n operator: 'equals',\n value: true\n }\n });\n }\n\n if (productId) {\n filterConditions.push({\n bool_operator: 'and',\n condition: {\n property: 'product_id',\n operator: 'equals',\n value: Number(productId)\n }\n });\n }\n\n if (feature) {\n filterConditions.push({\n bool_operator: 'and',\n condition: {\n property: 'feature',\n operator: 'equals',\n value: feature\n }\n });\n }\n\n return {\n navigation: {\n page: activePage,\n itemsOnPage: 20\n },\n totalCount: true,\n ...(subscription ? { hasSubscription: subscription } : null),\n filter: {\n collection: filterConditions\n },\n sort: [[activeSortProperty, activeSortDirection]]\n }\n}\n\nexport const getInstitutions = (data: GetListBodyStructure): Promise => {\n return axios.post(`${API_URL}/api/admin/institution`, data);\n};\n\nexport const useInstitutions = ({\n activePage,\n activeSearchKeyword,\n activeSortDirection,\n activeSortProperty,\n isNumber,\n isApproved,\n subscription,\n isRefetch,\n productId,\n feature,\n}: GetListParams) => {\n return useQuery({\n queryKey: [\n 'institutions',\n activePage,\n activeSearchKeyword,\n activeSortDirection,\n activeSortProperty,\n isNumber,\n isApproved,\n subscription,\n isRefetch,\n productId,\n feature,\n ],\n queryFn: () => {\n const params = buildInstitutionsListParams(\n activePage,\n activeSearchKeyword,\n activeSortDirection,\n activeSortProperty,\n isNumber,\n isApproved,\n subscription,\n productId,\n feature,\n );\n return getInstitutions(params)\n },\n keepPreviousData: true,\n });\n};\n","import { API_URL } from \"@/config\";\nimport { axios } from \"@/lib/axios\";\nimport { useAppDispatch } from '@/redux/hooks';\nimport { getAllClasses, getClassById } from '@/redux/reducers/classes/classesSlice';\nimport { useNotificationStore } from \"@/stores/notifications\";\nimport { useMutation, useQueryClient } from \"react-query\";\nimport { ClassShareData } from \"../../types\";\n\ntype ShareClassData = {\n classId: number;\n data: ClassShareData;\n}\n\nconst shareClass = ({classId, data}: ShareClassData) => {\n return axios.patch(`${API_URL}/api/admin/class/${classId}/share`, data)\n}\n\nexport const useShareClass = (closeModalFunction: () => void) => {\n const { addNotification } = useNotificationStore();\n const queryClient = useQueryClient();\n const dispatch = useAppDispatch();\n\n return useMutation({\n onError: (error: any) => {\n const title = error.message || 'Unable to share Class'\n addNotification({\n type: 'error',\n title\n });\n },\n onSuccess: (_, { classId }) => {\n queryClient.refetchQueries(['classes']);\n queryClient.refetchQueries(['getClass', classId]);\n addNotification({\n type: 'success',\n title: 'Class successfully shared',\n });\n dispatch(getAllClasses());\n dispatch(getClassById(classId));\n closeModalFunction();\n },\n mutationFn: shareClass,\n })\n}\n\n","import { API_URL } from \"@/config\";\nimport { axios } from \"@/lib/axios\";\nimport { useNotificationStore } from \"@/stores/notifications\";\nimport { useMutation, useQueryClient } from \"react-query\";\n\ntype DeleteData = {\n classId: number;\n quizId: number;\n}\n\nconst deleteQuizFromClass = ({ classId, quizId }: DeleteData): Promise => {\n return axios.delete(`${API_URL}/api/admin/class/${classId}/quiz/${quizId}`);\n}\n\nexport const useDeleteQuizFromClass = () => {\n const { addNotification } = useNotificationStore();\n const queryClient = useQueryClient();\n\n return useMutation({\n onMutate: async ({ classId }: DeleteData) => {\n await queryClient.cancelQueries(['getClass', classId]);\n },\n onError: () => {\n addNotification({\n type: 'error',\n title: 'Unable to delete Quiz from Class',\n });\n },\n onSuccess: (_,{ classId } ) => {\n queryClient.refetchQueries(['getClass', classId]);\n addNotification({\n type: 'success',\n title: 'Quiz successfully deleted',\n });\n },\n mutationFn: deleteQuizFromClass,\n })\n}","import { API_URL } from \"@/config\";\nimport { axios } from \"@/lib/axios\";\nimport { useNotificationStore } from \"@/stores/notifications\";\nimport { useMutation, useQueryClient } from \"react-query\";\nimport { ClassItem } from \"../../types\";\n\ntype AddData = {\n classId: number;\n quizzesIds: number[];\n}\n\nconst addQuizToClass = (data: AddData): Promise => {\n return axios.post(`${API_URL}/api/admin/class/quiz`, { quizzesIds: data.quizzesIds, classIds: [data.classId] });\n}\n\nexport const useAddQuizToClass = () => {\n const { addNotification } = useNotificationStore();\n const queryClient = useQueryClient();\n\n return useMutation({\n onMutate: async ({ classId }) => {\n await queryClient.cancelQueries(['getClass', classId]);\n },\n onError: (e: any) => {\n addNotification({\n type: 'error',\n title: e.message,\n });\n },\n onSuccess: async (_,{ classId } ) => {\n await queryClient.refetchQueries(['getClass', classId]);\n addNotification({\n type: 'success',\n title: 'Quiz successfully added',\n });\n },\n mutationFn: addQuizToClass,\n })\n}","import { API_URL } from \"@/config\";\nimport { axios } from \"@/lib/axios\";\nimport { useNotificationStore } from \"@/stores/notifications\";\nimport { useMutation, useQueryClient } from \"react-query\";\nimport { ClassItem } from \"../../types\";\n\ntype AddData = {\n classId: number;\n playlistsIds: number[];\n}\n\nconst addPlaylistsToClass = (data: AddData): Promise => {\n return axios.post(`${API_URL}/api/admin/class/playlist`, { playlistsIds: data.playlistsIds, classIds: [data.classId] });\n}\n\nexport const useAddPlaylistsToClass = () => {\n const { addNotification } = useNotificationStore();\n const queryClient = useQueryClient();\n\n return useMutation({\n onMutate: async ({ classId }) => {\n await queryClient.cancelQueries(['getClass', classId]);\n },\n onError: () => {\n addNotification({\n type: 'error',\n title: 'Unable to add Playlists to Class',\n });\n },\n onSuccess: async (_,{ classId } ) => {\n await queryClient.refetchQueries(['getClass', classId]);\n addNotification({\n type: 'success',\n title: 'Playlists successfully added',\n });\n },\n mutationFn: addPlaylistsToClass,\n })\n}","import { API_URL } from \"@/config\";\nimport { axios } from \"@/lib/axios\";\nimport { useNotificationStore } from \"@/stores/notifications\";\nimport { useMutation, useQueryClient } from \"react-query\";\n\ntype DeleteData = {\n classId: number;\n playlistId: number;\n}\n\nconst deletePlaylistFromClass = ({ classId, playlistId }: DeleteData): Promise => {\n return axios.delete(`${API_URL}/api/admin/class/${classId}/playlist/${playlistId}`);\n}\n\nexport const useDeletePlaylistFromClass = () => {\n const { addNotification } = useNotificationStore();\n const queryClient = useQueryClient();\n\n return useMutation({\n onMutate: async ({ classId }: DeleteData) => {\n await queryClient.cancelQueries(['getClass', classId]);\n },\n onError: () => {\n addNotification({\n type: 'error',\n title: 'Unable to delete Playlist from Class',\n });\n },\n onSuccess: (_,{ classId } ) => {\n queryClient.refetchQueries(['getClass', classId]);\n addNotification({\n type: 'success',\n title: 'Playlist successfully deleted',\n });\n },\n mutationFn: deletePlaylistFromClass,\n })\n}","import Icon from '@/components/Icon';\nimport { Button, Spinner, Tooltip } from '@chakra-ui/react';\nimport { IconName } from '@fortawesome/pro-solid-svg-icons';\nimport React from 'react';\nimport { Link } from 'react-router-dom';\n\ntype ActionButtonProps = {\n linkTo?: string;\n isInProcess: boolean;\n tooltipTitle: string;\n handleClick?: () => void;\n isLoading?: boolean;\n icon: IconName;\n height?:any;\n};\n\nexport const ActionButton = ({ linkTo, isInProcess, tooltipTitle, icon, handleClick, isLoading ,height}: ActionButtonProps) => {\n return (\n \n );\n};\n","import { axios } from \"@/lib/axios\";\nimport { Quiz } from \"@/types\";\nimport { useQuery } from \"react-query\";\n\nexport type GetQuizzesData = {\n navigation: {\n total_pages: number;\n items_per_page: number,\n page: number,\n more: boolean,\n items_on_page: number\n },\n result: Quiz[]\n}\n\ntype FilterCollection = {\n bool_operator?: string;\n condition?: {\n property: string;\n operator: string;\n value: string | number;\n };\n};\n\ntype GetListBodyStructure = {\n navigation: {\n page: number;\n itemsOnPage: number;\n };\n totalCount: boolean;\n filter: {\n collection: FilterCollection[] | null;\n };\n sort: string[][];\n};\n\nconst getQuizzesList = (): Promise => {\n return axios.get('/api/admin/quiz/list');\n}\n\nconst postQuizzesList = (data: GetListBodyStructure): Promise => {\n return axios.post('/api/admin/class/quiz_list', data);\n};\n\ntype Params = {\n activePage: number;\n activeSearchKeyword: string | number;\n itemsOnPage: number;\n isModalOpen: boolean;\n}\n\nexport const buildQuizzesParams = (\n activePage: number,\n activeSearchKeyword: string | number,\n itemsOnPage = 20,\n withAssign?: null,\n) => {\n return {\n navigation: {\n page: activePage,\n itemsOnPage,\n },\n totalCount: true,\n filter: {\n collection: [\n ...(activeSearchKeyword\n ? [\n {\n bool_operator: 'or',\n condition: {\n property: Number.isInteger(activeSearchKeyword) ? 'id' : 'title',\n operator: Number.isInteger(activeSearchKeyword) ? 'equals' : 'contains',\n value: Number.isInteger(activeSearchKeyword) ? activeSearchKeyword : activeSearchKeyword || '',\n },\n },\n ]\n : []),\n ],\n },\n sort: [['id', 'desc']],\n withAssign,\n };\n};\n\nexport const useGetQuizzesList = () => {\n return useQuery({\n queryKey: ['quizzesList'],\n queryFn: () => getQuizzesList(),\n })\n}\n\nexport const usePostQuizzesList = ({ activePage, activeSearchKeyword, itemsOnPage, isModalOpen }: Params) => {\n return useQuery({\n queryKey: ['postQuizzesList', activePage, activeSearchKeyword, itemsOnPage, isModalOpen],\n queryFn: () => isModalOpen ? postQuizzesList(buildQuizzesParams(activePage, activeSearchKeyword, itemsOnPage)) : null,\n useErrorBoundary: (error: any) => error.response?.status >= 400,\n })\n}","import { PlaylistData, PlaylistSection } from '@/features/Playlists';\n\nexport const handleSortSelect = (\n sortVal: string,\n activeSortProperty: string,\n activeSortDirection: string,\n setActiveSortProperty: (dir: string) => void,\n setActiveSortDirection: (dir: string) => void\n) => {\n if (activeSortProperty === sortVal) {\n activeSortDirection === 'asc' ? setActiveSortDirection('desc') : setActiveSortDirection('asc');\n } else {\n setActiveSortProperty(sortVal);\n setActiveSortDirection('asc');\n }\n};\n\nexport const setServersErrors = (e: Object, setFormError: CallableFunction) => {\n for (const [key, value] of Object.entries(e)) {\n if ('object' === typeof value) {\n if (undefined !== value[0] && undefined !== value[0].message) {\n setFormError(key, { message: value[0].message });\n }\n }\n }\n};\n\nexport const buildMyPlaylistParamsWithFilters = (\n activePage: number,\n activeSearchKeyword: string | number,\n activeSortDirection: string,\n activeSortProperty: string,\n isForPlaylists?: boolean | undefined,\n isSharedWith?: boolean | undefined,\n activeFilters?: [] | undefined\n) => {\n const params = buildMyPlaylistParams(activePage, activeSearchKeyword, activeSortDirection, activeSortProperty, isForPlaylists, isSharedWith);\n activeFilters?.map(({ operator, property, value }) => {\n const filterCondition = {\n bool_operator: 'and',\n condition: {\n property: property,\n operator: operator,\n value: value,\n },\n };\n params.filter.collection.push(filterCondition);\n });\n return params;\n};\n\nconst processActiveSearchKeyword = (activeSearchKeyword: string | number) => {\n if (!activeSearchKeyword) {\n return [];\n }\n\n const searchStr = activeSearchKeyword.toString();\n const parsedId = parseInt(searchStr);\n const isValidId = !isNaN(parsedId) && parsedId.toString() === searchStr;\n\n return isValidId\n ? [\n {\n bool_operator: 'and',\n collection: [\n {\n bool_operator: 'or',\n condition: {\n property: 'title',\n operator: 'contains',\n value: searchStr,\n },\n },\n {\n bool_operator: 'or',\n condition: {\n property: 'playlist_id',\n operator: 'equals',\n value: parsedId,\n },\n },\n ],\n },\n ]\n : searchStr.split(' ').map((keyword) => ({\n bool_operator: 'and',\n condition: {\n property: 'title',\n operator: 'contains',\n value: keyword ?? '',\n },\n }));\n};\n\nexport const buildMyPlaylistParams = (\n activePage: number,\n activeSearchKeyword: string | number,\n activeSortDirection: string,\n activeSortProperty: string,\n isForPlaylists?: boolean,\n isSharedWith?: boolean\n) => {\n return {\n navigation: {\n page: activePage,\n itemsOnPage: 20,\n },\n totalCount: true,\n filter: {\n collection: [\n ...processActiveSearchKeyword(activeSearchKeyword),\n ...(isForPlaylists\n ? [\n {\n bool_operator: 'and',\n condition: {\n property: 'shared_for_user_id',\n operator: isSharedWith ? 'is_not_null' : 'is_null',\n },\n },\n ]\n : []),\n ],\n },\n sort: [[activeSortProperty, activeSortDirection]],\n };\n};\n\nexport const buildListParamsWithFilters = (\n isAdminPlaylists: boolean,\n activePage: number,\n activeSearchKeyword: string | number,\n activeSortDirection: string,\n activeSortProperty: string,\n activeFilters?: [] | undefined\n) => {\n const params = buildListParams(isAdminPlaylists, activePage, activeSearchKeyword, activeSortDirection, activeSortProperty);\n activeFilters?.map(({ operator, property, value }) => {\n const filterCondition = {\n bool_operator: 'and',\n condition: {\n property: property,\n operator: operator,\n value: value,\n },\n };\n params.filter.collection.push(filterCondition);\n });\n return params;\n};\n\nexport const buildListParams = (\n isAdminPlaylists: boolean,\n activePage: number,\n activeSearchKeyword: string | number,\n activeSortDirection: string,\n activeSortProperty: string\n) => {\n return {\n navigation: {\n page: activePage,\n itemsOnPage: 20,\n },\n totalCount: true,\n filter: {\n collection: [\n ...processActiveSearchKeyword(activeSearchKeyword),\n ...[\n {\n bool_operator: 'and',\n condition: {\n property: 'owner_email',\n operator: isAdminPlaylists ? 'contains' : 'not_contains',\n value: 'jove.com',\n },\n },\n ],\n ],\n },\n sort: [[activeSortProperty, activeSortDirection]],\n };\n};\n\nexport const isNotNull = (it: T): it is NonNullable => it != null;\n\nexport const Reorder = (list: T[], startIndex: number, endIndex: number) => {\n const result = [...list];\n const [removed] = result.splice(startIndex, 1);\n result.splice(endIndex, 0, removed);\n\n return result.map((activity, index) => ({\n ...activity,\n sortIndex: index + 1,\n }));\n};\n\nexport const formatString = (str: string) =>\n str\n .replaceAll('\\n', '')\n .replaceAll('—', '—')\n .replaceAll('’', `'`)\n .replaceAll('"', `\"`)\n .replaceAll('', '')\n .replaceAll('', '')\n .replaceAll('', '')\n .replaceAll('', '')\n .replaceAll('', '')\n .replaceAll('', '')\n .replaceAll('ü', 'ü')\n .replaceAll('á', 'á');\n\nexport const numberWithCommas = (x: number) => {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n};\n\nexport const debounce = ReturnType>(func: F, waitFor: number): ((...args: any) => void) => {\n let timeout: NodeJS.Timeout;\n return (...args: any): void => {\n clearTimeout(timeout);\n timeout = setTimeout(() => func(...args), waitFor);\n };\n};\n\nexport const findIP: any = new Promise((r) => {\n const a = new window.RTCPeerConnection({ iceServers: [] }),\n b = () => {};\n a.createDataChannel('');\n a.createOffer((c) => a.setLocalDescription(c, b, b), b);\n a.onicecandidate = (c) => {\n try {\n c?.candidate?.candidate.match(/([0-9]{1,3}(\\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g)?.forEach(r);\n } catch (e) {}\n };\n});\n\nexport const getUserAreaDomain = (domain: string) => {\n if (domain === 'https://admin.jove.com') return 'https://app.jove.com';\n if (domain === 'https://admin.staging.jove.com') return 'https://app.staging.jove.com';\n if (domain === 'https://admin.qa.test.jove.com') return 'https://app.qa.test.jove.com';\n if (domain === 'https://admin.dev.test.jove.com') return 'https://app.dev.test.jove.com';\n\n const regex = /(? {\n const type = item.type === 'article' ? item.type : 'label';\n\n if (type === 'article') {\n return {\n id: item.id,\n sortIndex: index + 1,\n type: type,\n domainId: item.domainId,\n articles: [],\n };\n } else\n return {\n title: item.title,\n id: item.id,\n sortIndex: index + 1,\n type: type,\n domainId: item.domainId,\n articles: item.articles.map((child, index) => {\n return {\n id: child.id,\n sortIndex: index + 1,\n type: child.type,\n domainId: child.domainId,\n };\n }),\n };\n};\n\nexport const getParentStructure = (\n activePurpose: PlaylistSection | null,\n activeFieldOfStudy: PlaylistSection | null,\n specialtyItem: PlaylistSection | null\n) => {\n return activePurpose?.id\n ? {\n id: activePurpose?.id ?? null,\n domainId: activePurpose?.domain_id,\n title: activePurpose?.title ?? '',\n type: activePurpose?.type ?? '',\n child: activeFieldOfStudy?.id\n ? {\n id: activeFieldOfStudy?.id ?? null,\n domainId: activeFieldOfStudy?.domain_id,\n title: activeFieldOfStudy?.title ?? '',\n type: activeFieldOfStudy?.type ?? '',\n child: specialtyItem?.id\n ? {\n id: specialtyItem?.id ?? null,\n domainId: specialtyItem?.domain_id,\n title: specialtyItem?.title ?? null,\n type: specialtyItem?.type ?? null,\n }\n : null,\n }\n : null,\n }\n : null;\n};\n\nexport const getTopics = (element: PlaylistData, index: number) => {\n return {\n id: element?.domainId === null ? null : element?.id,\n title: element.title,\n sortIndex: index + 1,\n articles:\n element?.articles?.map((child, index) => ({\n id: child.domainId === null ? null : child.id,\n articleId: child.domainId === null ? child?.id : child.domainId,\n sortIndex: index + 1,\n })) ?? null,\n };\n};\n\nexport const parseText = (text: string) => {\n const parser = new DOMParser();\n return parser.parseFromString(text, 'text/html').body.textContent;\n};\n\nexport const modelShaper = (items: string[] | any[]) => {\n const shapedArray = [...items];\n shapedArray.sort((a, b) => (a.sortIndex || 0) - (b.sortIndex || 0));\n\n let videoContentCount = 0;\n\n shapedArray.forEach((item) => {\n if (item.type !== 1) {\n item.questionOrder = ++videoContentCount;\n }\n });\n\n return shapedArray;\n};\n","import { RootState } from '@/redux/store';\nimport { createSelector, createSlice, PayloadAction } from '@reduxjs/toolkit';\nimport { ListContext, Ctx, LandingPagesType } from '@/types';\n\ninterface Data {\n researchId?: number;\n educationId?: number;\n joveCoreId?: number;\n joveScienceId?: number;\n landingPagesId?: number;\n joveJournalId?: number;\n encyclopediaId?: number;\n joveManualId?: number;\n syllabusId?: number;\n textBooksId?: number;\n traditionalResourcesId?: number;\n openEducationsResourcesId?: number;\n facultyResourcesId?: number;\n ltiId?: number;\n joveVideoTextbookId?: number;\n\n listOfContent: ListContext['children'];\n joveCoreList: ListContext;\n joveCoreTree: Ctx;\n joveScienceEducationList: ListContext;\n joveLabManualList: ListContext;\n joveLabManualTree: Ctx;\n joveEncyclopediaOfExperimentsList: ListContext;\n researchSubjectsList: ListContext;\n landingPagesList: LandingPagesType;\n educationSubjectsList: ListContext;\n ltiSubjectsList: ListContext;\n}\n\nconst initialState: Data = {\n researchId: -1,\n educationId: -1,\n joveCoreId: -1,\n joveScienceId: -1,\n joveJournalId: -1,\n encyclopediaId: -1,\n joveManualId: -1,\n syllabusId: 0,\n textBooksId: 0,\n traditionalResourcesId: 0,\n openEducationsResourcesId: 0,\n facultyResourcesId: 0,\n landingPagesId: -1,\n ltiId: -1,\n joveVideoTextbookId: -1,\n\n listOfContent: [] as ListContext['children'],\n joveCoreList: {} as ListContext,\n joveCoreTree: {} as Ctx,\n joveScienceEducationList: {} as ListContext,\n joveLabManualList: {} as ListContext,\n joveLabManualTree: {} as Ctx,\n joveEncyclopediaOfExperimentsList: {} as ListContext,\n researchSubjectsList: {} as ListContext,\n landingPagesList: {} as LandingPagesType,\n educationSubjectsList: {} as ListContext,\n ltiSubjectsList: {} as ListContext,\n};\n\nexport const DataSlice = createSlice({\n name: 'Data',\n initialState,\n reducers: {\n initIds(\n state: Data,\n action: PayloadAction<{\n joveCoreId?: number;\n joveScienceId?: number;\n joveJournalId?: number;\n encyclopediaId?: number;\n joveManualId?: number;\n syllabusId?: number;\n textBooksId?: number;\n facultyResourcesId?: number;\n traditionalResourcesId?: number;\n openEducationsResourcesId?: number;\n landingPagesId?: number;\n ltiId?: number;\n joveVideoTextbookId?: number;\n }>\n ) {\n\n state.joveCoreId = action.payload.joveCoreId;\n state.joveScienceId = action.payload.joveScienceId;\n state.joveJournalId = action.payload.joveJournalId;\n state.encyclopediaId = action.payload.encyclopediaId;\n state.joveManualId = action.payload.joveManualId;\n state.syllabusId = action.payload.syllabusId;\n state.textBooksId = action.payload.textBooksId;\n state.traditionalResourcesId = action.payload.traditionalResourcesId,\n state.openEducationsResourcesId = action.payload.openEducationsResourcesId,\n state.facultyResourcesId = action.payload.facultyResourcesId;\n state.landingPagesId = action.payload.landingPagesId;\n state.ltiId = action.payload.ltiId;\n state.joveVideoTextbookId = action.payload.joveVideoTextbookId;\n\n },\n initContentList(state: Data, action: PayloadAction) {\n state.listOfContent = action.payload.children;\n },\n // JoveCore\n initJoveCore(state: Data, action: PayloadAction) {\n state.joveCoreList = action.payload;\n },\n initJoveCoreTree(state: Data, action: PayloadAction) {\n state.joveCoreTree = action.payload;\n },\n // ScienceEducation\n initScienceEducation(state: Data, action: PayloadAction) {\n state.joveScienceEducationList = action.payload;\n },\n // Lab Manual\n initJoveLabManual(state: Data, action: PayloadAction) {\n state.joveLabManualList = action.payload;\n },\n initJoveLabManualTree(state: Data, action: PayloadAction) {\n state.joveLabManualTree = action.payload;\n },\n // JoveEncyclopediaOfExperiments\n initJoveEncyclopediaOfExperiments(state: Data, action: PayloadAction) {\n state.joveEncyclopediaOfExperimentsList = action.payload;\n },\n initResearchSubjects(state: Data, action: PayloadAction) {\n state.researchSubjectsList = action.payload;\n },\n initLandingPages(state: Data, action: PayloadAction) {\n state.landingPagesList = action.payload;\n },\n // misc\n initEducationSubjects(state: Data, action: PayloadAction) {\n state.educationSubjectsList = action.payload;\n },\n initLtiSubjects(state: Data, action: PayloadAction) {\n state.ltiSubjectsList = action.payload;\n },\n },\n});\nexport const {\n initIds,\n initContentList,\n initJoveCore,\n initJoveCoreTree,\n initScienceEducation,\n initJoveLabManual,\n initJoveLabManualTree,\n initJoveEncyclopediaOfExperiments,\n initResearchSubjects,\n initLandingPages,\n initEducationSubjects,\n initLtiSubjects\n} = DataSlice.actions;\nexport default DataSlice.reducer;\n","import { createAsyncThunk, createSlice, createEntityAdapter, PayloadAction, createSelector } from '@reduxjs/toolkit';\nimport { PlaylistLabelResponse } from '../../../../features/Playlists';\nimport { createPlaylistLabel, editPlaylistLabel } from '../../../../features/Playlists/api';\nimport { playlistLabelProp } from '../../../../features/Playlists/types';\nimport { RootState } from '../../../store';\nimport { isNotNull } from '../../../../utils/helpers';\nimport { SectionPath } from '../../../../features/Playlists/types';\n\nexport type sectionsList = {\n domain_id: string;\n domain_title: string;\n domain_type: string;\n section_id: string;\n};\n\ntype LabelData = {\n id: number;\n sortNumber: number;\n path?: string;\n locale?: string;\n domainType?: string;\n sectionsList?: sectionsList[];\n sectionpath: SectionPath[];\n domain: {\n id: number;\n uid: string;\n title: string;\n titleDescription: null | string;\n titleImage: null | string;\n headerDescription: null | string;\n headerImage: null | string;\n accessType: number;\n isActive: boolean;\n type: string;\n professorName?: string;\n courseName?: string;\n institutionName?: string;\n dateEnd: null | string;\n isEnabled: boolean;\n articleType?: string;\n status: number;\n images: {\n short?: string | null;\n large?: string | null;\n }\n }\n}\n\ntype lastLabelAdapter = LabelData & {\n children: [];\n}\n\nexport type childrenLabelAdapter = LabelData & {\n children: lastLabelAdapter[];\n title?: string;\n headerImage?: string;\n id: number;\n}\n\nexport type LabelAdapter = LabelData & {\n children: childrenLabelAdapter[];\n}\n\ntype LabelState = {\n isLoading: boolean;\n isError: boolean;\n}\n\nconst labelAdapter = createEntityAdapter();\n\nexport const createLabel = createAsyncThunk(\n 'playlist/articles/createPlaylistLabel',\n async ({ id, data }, { rejectWithValue }) => {\n try {\n return await createPlaylistLabel({ id, data });\n } catch (error) {\n let message = '';\n if (error instanceof Error) {\n message = error.message ||\n error.toString();\n }\n\n return rejectWithValue(message);\n }\n });\n\nexport const editLabel = createAsyncThunk(\n 'playlist/articles/editPlaylistLabel',\n async ({ id, data }, { rejectWithValue }) => {\n try {\n return await editPlaylistLabel({ id, data });\n } catch (error) {\n let message = '';\n if (error instanceof Error) {\n message = error.message ||\n error.toString();\n }\n\n return rejectWithValue(message);\n }\n });\n\nconst labelSlice = createSlice({\n name: 'label',\n initialState: labelAdapter.getInitialState({\n isLoading: false,\n isError: false,\n }),\n reducers: {\n resetLabels: (state) => {\n labelAdapter.removeAll(state);\n },\n },\n extraReducers: {\n [createLabel.pending.type]: (state) => {\n state.isLoading = true;\n state.isError = false;\n },\n [createLabel.fulfilled.type]: (state, action: PayloadAction) => {\n labelAdapter.upsertOne(state, action.payload);\n state.isLoading = false;\n state.isError = false;\n },\n [createLabel.rejected.type]: (state) => {\n state.isLoading = false;\n state.isError = true;\n },\n [editLabel.pending.type]: (state) => {\n state.isLoading = true;\n state.isError = false;\n },\n [editLabel.fulfilled.type]: (state, action: PayloadAction) => {\n labelAdapter.upsertOne(state, action.payload);\n state.isLoading = false;\n state.isError = false;\n },\n [editLabel.rejected.type]: (state) => {\n state.isLoading = false;\n state.isError = true;\n },\n },\n});\n\nexport const label = labelSlice.reducer;\n\nexport const { resetLabels } = labelSlice.actions;\n\nconst selectState = (state: RootState) => state.playlistReducer.label;\nexport const { selectById, selectIds } = labelAdapter.getSelectors(selectState);\nconst selectRootState = (state: RootState) => state;\n\nexport const selectLabelsById = createSelector(\n [selectRootState, (state: RootState, id: number | null) => (id ? selectById(state, id) ?? null : null)],\n (_, entity) => entity,\n);\n\nexport const selectAllLabels = createSelector([selectIds, selectRootState], (ids, state) =>\n ids.map((id) => selectLabelsById(state, Number(id))).filter(isNotNull),\n);\n","import {\n Flex,\n Button,\n Image,\n Modal,\n ModalCloseButton,\n ModalContent,\n ModalFooter,\n ModalOverlay, ModalHeader,\n} from '@chakra-ui/react';\nimport React, { useRef, useState } from 'react';\nimport ReactCrop from 'react-image-crop';\n\ntype Props = {\n isOpen: boolean;\n imagePreviewUrl: string;\n submitting: boolean;\n onSubmit: (fileBase64: string) => Promise;\n onClose: () => void;\n}\n\nexport const CropModal = ({ isOpen, onClose, submitting, imagePreviewUrl, onSubmit }: Props) => {\n const imgRef = useRef(null);\n const [crop, setCrop] = useState({ unit: 'px', width: 150, height: 50 });\n const [previewUrl, setPreviewUrl] = useState('');\n\n const makeClientCrop = async (crop: any) => {\n if (imgRef.current && crop.width && crop.height) {\n createCropPreview(imgRef.current, crop);\n }\n };\n\n const createCropPreview = async (image: any, crop: any) => {\n const canvas = document.createElement('canvas');\n\n const scaleX = image.naturalWidth / image.width;\n const scaleY = image.naturalHeight / image.height;\n canvas.width = crop.width;\n canvas.height = crop.height;\n const ctx: any = canvas.getContext('2d');\n\n ctx.drawImage(\n image,\n crop.x * scaleX,\n crop.y * scaleY,\n crop.width * scaleX,\n crop.height * scaleY,\n 0,\n 0,\n crop.width,\n crop.height,\n );\n\n setPreviewUrl(canvas.toDataURL('image/png'));\n };\n\n return (\n \n \n \n \n Crop your image\n \n \n \n setCrop(c)}\n onComplete={makeClientCrop}>\n \n \n \n \n \n \n \n \n \n );\n};\n","import React, { Fragment } from 'react';\nimport { Flex, Heading, Text, Stack } from '@chakra-ui/react';\nimport { formatString } from '@/utils/helpers';\nimport { Link } from 'react-router-dom';\nimport {SearchArticles} from \"@/types\";\n\ntype Props = {\n authorsObject?: SearchArticles['authors'];\n};\n\nexport const AuthorsInfo = ({ authorsObject }: Props) => {\n const authors = authorsObject?.authors ?? [];\n const institutions = authorsObject?.institutions ?? [];\n\n return (\n \n {authors.length > 0 && (\n <>\n \n Authors\n \n \n \n {authors.map(\n (author, i) => (\n \n \n {formatString(`${author.name}`)}\n \n {author?.institutionIndexes !== null && (\n \n {author?.institutionIndexes.map((institution, index) => (\n \n {institution}\n {index < author.institutionIndexes.length - 1 && ', '}\n \n ))}\n \n )}\n {i < authors.length - 1 && ', '}\n \n )\n )}\n \n \n >\n )}\n {institutions.length > 0 && (\n <>\n \n Institution\n \n \n \n {institutions.map((institution, i, arr) => (\n \n {i + 1}\n \n {`${institution.departmentTitle} `}\n \n {institution.institutionTitle}\n \n \n {i < arr.length - 1 && ', '}\n \n ))}\n \n \n >\n )}\n \n );\n}\n","import { useNotificationStore } from '@/stores/notifications';\nimport parse from 'html-react-parser';\nimport React, { Dispatch, SetStateAction, useCallback, MouseEvent, useState, useEffect } from 'react';\nimport {\n Flex,\n Image,\n Heading,\n HStack,\n Text,\n Box,\n} from '@chakra-ui/react';\nimport { Link, useLocation } from 'react-router-dom';\nimport { Path, SearchArticles } from \"@/types\";\nimport { AuthorsInfo } from \"@/features/Playlists/components/PlaylistForm/AuthorsInfo\";\n\ntype Props = {\n openId: number;\n setOpenId: Dispatch>;\n video: SearchArticles;\n onSelect: (videoId: number, title: string, imageArr: string[], type: string) => void\n closeModal: () => void;\n searchData?: {\n searchValue: string;\n contentType: string;\n activePage: number;\n };\n selectedLabel?: any;\n setIsError?: React.Dispatch>;\n}\n\nexport const VideoListItem = ({\n video,\n onSelect,\n openId,\n setOpenId,\n closeModal,\n searchData,\n selectedLabel,\n setIsError\n }: Props) => {\n const { id, title, header_image, authors, images, path, inCollection, article_type } = video;\n const { pathname } = useLocation();\n const isClientHub = pathname.includes('client-hub-playlist');\n const { addNotification } = useNotificationStore();\n\n const [image, setImage] = useState();\n\n useEffect(() => {\n setImage(images?.short || images?.large || header_image || '/assets/VideoComingSoonTeaser.webp');\n }, [header_image, images.large, images.short]);\n\n const handleError = () => setImage('/assets/VideoComingSoonTeaser.webp');\n\n const education = ['jove_core', 'lab_manual_prep', 'lab_manual', 'lab_manual_procedure', 'science_education'];\n const labManual = ['lab_manual_prep', 'lab_manual', 'lab_manual_procedure'];\n\n const checkSection = () => {\n switch (article_type) {\n case 'journal':\n return 'Journal';\n case 'encyclopedia_of_experiments':\n return 'Encyclopedia of Experiments';\n case 'jove_core':\n return 'Core';\n case 'science_education':\n return 'Science education library';\n case 'lab_manual':\n return 'Lab manual';\n case 'lab_manual_prep':\n return 'Lab manual';\n case 'lab_manual_procedure':\n return 'Lab manual';\n default:\n return '';\n }\n };\n\n const section = checkSection();\n\n const labManualTitle = () => {\n switch (article_type) {\n case 'lab_manual':\n return 'Concept';\n case 'lab_manual_prep':\n return 'Prep Student';\n case 'lab_manual_procedure':\n return 'Student Protocol';\n default:\n return;\n }\n };\n\n const subject = (arr: Path[]) => {\n let subjectTitle;\n arr.forEach((item) => {\n if (item.type === 'subject') {\n subjectTitle = item.title;\n }\n });\n return subjectTitle;\n };\n\n const topic = (arr: Path[]) => {\n let topicTitle: string = '';\n arr.forEach((item) => {\n if (item.type === 'topic') {\n topicTitle = item.title;\n }\n });\n return topicTitle;\n };\n\n const handlerClick = useCallback((e: MouseEvent) => {\n e.stopPropagation();\n e.preventDefault();\n\n if (isClientHub && !selectedLabel) {\n addNotification({\n title: 'Please choose a label',\n type: 'error'\n })\n setIsError && setIsError(true);\n } else {\n setIsError && setIsError(false);\n onSelect(video.id, title, [header_image ?? '', images?.short ?? '', images?.large ?? '', '/assets/VideoComingSoonTeaser.webp'], video.article_type);\n window.sessionStorage.setItem('editPlaylistSearchData', JSON.stringify(searchData));\n }\n }, [video.id, onSelect, closeModal, selectedLabel])\n\n return (\n <>\n \n \n \n \n \n \n {labManual.includes(article_type) ? `${parse(title)} - ${labManualTitle()}` : parse(title)}\n \n\n |}\n color={'#2E73C5'}\n fontSize={'12px'}\n letterSpacing={'.7px'}\n pos={'relative'}\n >\n\n {openId === id && (\n setOpenId(-1)}>\n \n \n )}\n\n {title && (\n \n {education.includes(article_type)\n ? section.match(/Science education/gi)\n ? `Science Education (${subject(path)})`\n : `Education (${section}: ${subject(path)})`\n : `Journal ${topic(path) ? `(${topic(path)})` : ''}`}\n \n )}\n\n {inCollection &&\n e.stopPropagation()}>\n Methods Collections\n \n }\n \n \n \n >\n );\n};\n","import React, {FC, SetStateAction, Dispatch, useState} from 'react';\nimport {\n Box,\n Button,\n Divider,\n Flex,\n Input,\n InputGroup,\n InputRightElement,\n Stack,\n Text,\n VStack,\n MenuItem\n} from '@chakra-ui/react';\nimport DatePicker from 'react-datepicker';\nimport Icon from '@/components/Icon';\n\ntype Props = {\n title: string,\n variant: string,\n dateFrom?: Date,\n dateTo?: Date,\n setDateFrom?: Dispatch>,\n setDateTo?: Dispatch>,\n setValue?: Dispatch>\n}\n\nconst ModalFilter: FC = ({title, variant, setValue, dateFrom, dateTo, setDateFrom , setDateTo}) => {\n const [inputText, setInputText] = useState('');\n const [from, setFrom] = React.useState(new Date('01/01/2000'));\n const [until, setUntil] = React.useState(new Date());\n\n const clear = () => {\n if (setValue && variant !== 'datePicker') {\n setInputText('');\n setValue('');\n } else if (setDateFrom && setDateTo && variant === 'datePicker') {\n setDateFrom(new Date('01/01/2000'));\n setDateTo(new Date())\n }\n }\n\n const handleSaveFilter = () => {\n if (setValue) {\n setValue(inputText);\n } else if (setDateFrom && setDateTo && variant === 'datePicker') {\n setDateFrom(from);\n setDateTo(until)\n }\n }\n return (\n \n \n \n {variant === 'datePicker' ? title : `Search ${title}`}\n \n {variant === 'input' && \n \n setInputText(e.target.value)}\n />\n \n \n \n \n }\n\n {variant === 'datePicker' && \n \n \n From:\n \n setFrom(date)} />\n \n \n \n Until:\n \n setUntil(date)} />\n \n }\n\n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default ModalFilter\n","import React, { useState, useCallback, useEffect, useRef } from 'react';\nimport { useAppDispatch } from '@/redux/hooks';\nimport {\n Modal,\n ModalOverlay,\n ModalContent,\n ModalHeader,\n ModalBody,\n ModalCloseButton,\n Button,\n InputGroup,\n InputLeftElement,\n InputRightElement,\n Flex,\n Input,\n Box,\n Text,\n Menu,\n MenuButton,\n MenuList,\n Divider,\n Spinner,\n Checkbox,\n Select,\n} from '@chakra-ui/react';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { Pagination } from '@/components/Pagination';\nimport { useForm } from 'react-hook-form';\nimport * as yup from 'yup';\nimport { Link, useLocation } from 'react-router-dom';\nimport { VideoListItem} from './VideoListItem';\nimport { resetArticlesPages } from '@/redux/reducers/playlist/articles/articlesSlice';\nimport ModalFilter from './ModalFilter';\nimport { getSectionSubjectTree } from '@/redux/reducers/playlist/articles/sectionSlice';\nimport { SearchArticles } from '@/types';\nimport { PlaylistData } from '../../types';\nimport { FiInfo } from 'react-icons/fi';\nimport { fetchSearch } from '@/utils/api';\nimport { useQuery } from 'react-query';\nimport Icon from '@/components/Icon';\n\nlet searchInputSchema = yup.object().shape({\n keyword: yup.string(),\n});\n\nexport type SearchFormData = {\n keyword: string;\n labels: string;\n};\n\ntype Props = {\n isOpen: boolean;\n onClose: () => void;\n onSelect: (videoId: number, title: string, imageArr: string[], type: string) => void;\n articles?: PlaylistData[]\n handleLabelSelect?: (value: string) => void;\n setImportQuestion?: () => void;\n selectedLabel?: string;\n};\n\nexport const buildEditorsParams = (\n activePage: number,\n activeSearchKeyword: string | number,\n publicationDateStart?: string,\n publicationDateEnd?: string,\n authorName?: string,\n institutionName?: string,\n activeSubjects?: string[]\n) => {\n return {\n navigation: {\n page: activePage,\n itemsOnPage: 9,\n },\n totalCount: true,\n filter: {\n collection: [\n ...(activeSearchKeyword\n ? [\n {\n bool_operator: 'and',\n condition: {\n property: 'title',\n operator: 'contains',\n value: activeSearchKeyword ?? 0,\n },\n },\n ]\n : []),\n ...(authorName\n ? [\n {\n bool_operator: 'and',\n condition: {\n property: 'full_name',\n operator: 'contains',\n value: authorName ?? 0,\n },\n },\n ]\n : []),\n ...(publicationDateStart || publicationDateEnd\n ? [\n {\n bool_operator: 'and',\n condition: {\n property: 'published_at',\n operator: 'between',\n value: [publicationDateStart, publicationDateEnd] ?? 0,\n },\n },\n ]\n : []),\n ...(institutionName\n ? [\n {\n bool_operator: 'and',\n condition: {\n property: 'institution_name',\n operator: 'contains',\n value: institutionName ?? 0,\n },\n },\n ]\n : []),\n activeSubjects?.length && {\n bool_operator: 'and',\n condition: {\n property: 'section_id',\n operator: 'in',\n value: activeSubjects.map(Number) ?? 0,\n },\n },\n ],\n },\n sort: [['id']],\n };\n};\n\nexport const AddVideoModal = ({\n isOpen,\n onClose,\n onSelect,\n articles,\n handleLabelSelect,\n setImportQuestion,\n selectedLabel,\n }: Props) => {\n const location = useLocation().pathname;\n const editPlaylistSearchData = JSON.parse(window.sessionStorage.getItem('editPlaylistSearchData') as string);\n\n const ref = useRef(null);\n const [activePage, setActivePage] = useState(editPlaylistSearchData?.activePage ?? 1);\n const [publicationDateStart, setPublicationDateStart] = useState();\n const [publicationDateEnd, setPublicationDateEnd] = useState();\n const [, setActiveSubjects] = useState([]);\n const [checkAllArr1,] = useState([]);\n const [checkAllArr2,] = useState([]);\n const [openId, setOpenId] = useState(-1);\n const [openAdvancedFilter, setOpenAdvancedFilter] = useState(false);\n const [value, setValue] = useState(editPlaylistSearchData?.searchValue ?? '');\n const [pageCount, setPageCount] = useState(0);\n const [from, setFrom] = useState(null);\n const [to, setTo] = useState(null);\n const [contentType, setContentType] = useState(editPlaylistSearchData?.contentType ?? '');\n const [totalPages, setTotalPages] = useState();\n const [totalPagesJournalContent, setTotalPagesJournalContent] = useState();\n const [totalPagesSciedContent, setTotalPagesSciedContent] = useState();\n const [searchData, setSearchData] = useState({ searchValue: '', contentType: '', activePage: 1 });\n const [isError, setIsError] = useState(false);\n\n const journalContent = 'journal_content';\n const sciedContent = 'scied_content';\n const isAddVideo = location == '/quiz/create' || location.includes('/quiz/edit/');\n\n const dispatch = useAppDispatch();\n\n const {\n register,\n getValues,\n setValue: setKeyword,\n reset,\n formState: { isSubmitting },\n } = useForm({\n resolver: yupResolver(searchInputSchema),\n defaultValues: {\n keyword: '',\n labels: '',\n },\n });\n\n useEffect(() => {\n publicationDateStart && setFrom(publicationDateStart.toISOString().slice(0, 10));\n publicationDateEnd && setTo(publicationDateEnd.toISOString().slice(0, 10));\n }, [publicationDateStart, publicationDateEnd]);\n\n const { isFetching, data: dataSearch } = useQuery(\n [`search`, value, activePage, from, to, contentType, isOpen],\n () => isOpen ? fetchSearch(value, contentType, activePage, from, to) : null,\n );\n\n const handleReset = useCallback(() => {\n setValue('');\n reset();\n }, []);\n\n const handleSearch = () => {\n setValue(getValues('keyword'));\n setActivePage(1);\n };\n\n const handlePagination = (page: number) => {\n if (ref && ref.current) {\n ref.current.scrollIntoView();\n }\n setActivePage(page);\n };\n\n const handleResearch = () => {\n setContentType(journalContent);\n setActivePage(1);\n };\n\n const handleEducation = () => {\n setContentType(sciedContent);\n setActivePage(1);\n };\n\n const itemsLength = dataSearch?.navigation?.total_items;\n const start = 12 * (activePage - 1) + 1;\n const end = itemsLength && (12 * (activePage - 1) + 12 <= itemsLength ? 12 * (activePage - 1) + 12 : itemsLength);\n\n useEffect(() => {\n dataSearch && itemsLength ? setPageCount(Math.ceil(itemsLength / dataSearch?.navigation.items_on_page)) : setPageCount(0);\n }, [dataSearch]);\n\n useEffect(() => {\n setActivePage(1);\n }, [value, to, from]);\n\n useEffect(() => {\n setKeyword('keyword', value);\n setActivePage(editPlaylistSearchData?.activePage ?? 1);\n }, []);\n\n useEffect(() => {\n setSearchData({ searchValue: value, contentType: contentType, activePage: activePage });\n }, [value, contentType, activePage]);\n\n useEffect(() => {\n dispatch(getSectionSubjectTree());\n }, [dispatch]);\n\n useEffect(() => {\n setActiveSubjects([...checkAllArr1, ...checkAllArr2]);\n }, [checkAllArr1, checkAllArr2, setActiveSubjects]);\n\n useEffect(() => {\n return () => {\n dispatch(resetArticlesPages());\n };\n }, [dispatch]);\n\n useEffect(() => {\n if (totalPages) return;\n\n dataSearch?.navigation?.total_pages\n && !value\n && !contentType\n && setTotalPages(dataSearch?.navigation?.total_pages);\n }, [dataSearch]);\n\n useEffect(() => {\n if (totalPagesJournalContent) return;\n\n dataSearch?.navigation?.total_pages\n && !value\n && contentType === journalContent\n && setTotalPagesJournalContent(dataSearch?.navigation?.total_pages);\n }, [dataSearch]);\n\n useEffect(() => {\n if (totalPagesSciedContent) return;\n\n dataSearch?.navigation?.total_pages\n && !value\n && contentType === sciedContent\n && setTotalPagesSciedContent(dataSearch?.navigation?.total_pages);\n }, [dataSearch]);\n\n const pagination = {\n activePage,\n pageCount: (!value\n ? (contentType\n ? (contentType === journalContent\n ? totalPagesJournalContent\n : totalPagesSciedContent)\n : totalPages)\n : pageCount\n ),\n itemsOnPage: dataSearch?.navigation?.items_on_page,\n };\n\n const handleClose = () => {\n onClose();\n };\n\n return (\n \n \n \n {isAddVideo ? (\n \n Add Video\n \n ) : (\n Add Video\n )}\n \n \n \n \n \n {isAddVideo ? (\n <>\n e.key === 'Enter' && handleSearch()}\n w={'full'}\n display={'flex'}\n alignItems={'center'}\n >\n \n \n \n \n\n {getValues('keyword')?.length > 0 && (\n \n \n \n )}\n {' '}\n setImportQuestion && setImportQuestion()}>\n Import Questions\n \n \n \n {' '}\n \n Only Education videos have questions that can be\n imported.\n \n >\n ) : (\n e.key === 'Enter' && handleSearch()}\n w={'full'}\n display={'flex'}\n alignItems={'center'}\n >\n \n \n \n \n {getValues('keyword')?.length > 0 && (\n \n \n \n )}\n \n )}\n \n \n To verify which videos you can play in full, please check which content is provided in\n your institution's JoVE\n subscription{' '}\n \n here\n \n .\n \n <>\n \n \n \n \n \n {openAdvancedFilter ? (\n \n \n \n ) : (\n <>>\n )}\n >\n {isAddVideo && \n \n }\n \n\n {!isAddVideo &&\n \n }\n\n \n \n {isFetching ? (\n \n \n \n ) : dataSearch?.result?.length ? (\n \n {value && (\n \n {dataSearch.result.length > 0\n ? `Showing ${start} - ${end} of ${itemsLength} results ${value ? `for \"${value}\"` : ''}`\n : `Showing 0 results ${value ? `for \"${value}\"` : ''}`}\n \n )}\n\n {dataSearch &&\n dataSearch.result?.map((video: SearchArticles) => (\n \n ))}\n\n {pagination && pagination?.itemsOnPage && pagination.pageCount && pagination.itemsOnPage && (\n \n \n \n )}\n \n ) : (\n \n No match found\n \n )}\n \n \n \n );\n};\n","import React, { useState, useEffect, useContext, createContext } from 'react';\nimport { getProfile, loginWithEmailAndPassword } from '@/api/authApi/authApi';\nimport storage from \"@/utils/storage\";\nimport { User } from \"@/types\";\n\ninterface AuthContextInterface {\n user: User | null,\n authChecked: boolean,\n handleLogin: ({email, password}: { email: string, password: string }) => void\n handleLogout: () => void\n handleSetPasswordLogin: (token:string) => void\n}\n\nconst AuthContext = createContext(undefined);\n\ntype contextProps = {\n children: React.ReactNode\n}\n\nfunction AuthProvider({children}: contextProps) {\n const [user, setUser] = useState(null);\n const [authChecked, setAuthChecked] = useState(false);\n\n useEffect(() => {\n handleAuthCheck();\n }, []);\n\n const handleAuthCheck = async () => {\n let token = storage.getToken();\n if (token === 'empty') {\n await setUser(null);\n storage.clearToken();\n setAuthChecked(true);\n } else {\n getUser();\n }\n }\n\n const handleLogin = async ({email, password}: { email: string, password: string }) => {\n const res = await loginWithEmailAndPassword({email, password});\n storage.setToken(res.token)\n await getUser()\n return user;\n };\n\n const handleSetPasswordLogin = async (token:string ) => {\n storage.setToken(token)\n await getUser()\n return user;\n };\n\n const handleLogout = () => {\n storage.clearToken();\n setUser(null)\n }\n\n const getUser = async () => {\n try {\n if (storage.getToken()) {\n let userRes = await getProfile();\n setUser(userRes)\n } else {\n storage.clearToken();\n }\n setAuthChecked(true);\n return null;\n } catch (err) {\n throw err;\n }\n };\n\n\n return (\n \n {authChecked && children}\n \n );\n}\n\nfunction useAuth() {\n const context = useContext(AuthContext);\n if (context === undefined) {\n throw new Error(`useAuth must be used within a AuthProvider`);\n }\n return context;\n}\n\nexport {AuthProvider, useAuth};\n","import { API_URL } from \"@/config\";\nimport { axios } from '@/lib/axios';\nimport { TagsResponse } from '../types';\n\nexport const getTags = (): Promise => {\n return axios.get(`${API_URL}/api/free/tag_list`);\n};\n","import React, { useCallback } from 'react';\nimport {\n Modal,\n ModalContent,\n ModalOverlay,\n ModalHeader,\n ModalCloseButton,\n ModalBody,\n ModalFooter,\n Button\n} from '@chakra-ui/react';\nimport { deleteTemplateQuiz, QuizType, selectQuizLoading } from '@/redux/reducers/quizzes/quizSlice';\nimport { shallowEqual, useDispatch, useSelector } from 'react-redux';\nimport { AppDispatch } from '@/redux/store';\nimport { QuizLibrary } from \"@/features/Quiz\";\nimport { removeQuizLibrary } from \"@/redux/reducers/quizzes/quizLibrary\";\nimport { removeQuizAdmin } from \"@/redux/reducers/quizzes/quizAdmin\";\nimport { useDeleteQuiz } from \"@/features/Quiz/api/deleteRegularQuiz\";\nimport { removeQuizCustomer } from \"@/redux/reducers/quizzes/quizCustomer\";\nimport {useNotificationStore} from \"@/stores/notifications\";\n\ntype Props = {\n isOpen: boolean;\n onClose: () => void;\n quiz: QuizType | QuizLibrary;\n quizType: 'regular' | 'admin' | 'template' | 'library' | 'customer'\n};\n\nexport const DeleteQuizModal = ({ isOpen, onClose, quiz, quizType }: Props) => {\n const deleteQuizMutation = useDeleteQuiz(onClose);\n const dispatch = useDispatch();\n const isLoading = useSelector(selectQuizLoading, shallowEqual);\n const {addNotification} = useNotificationStore();\n\n const handleDelete = useCallback(async () => {\n if (quizType === 'library') {\n await dispatch(removeQuizLibrary(quiz.id))\n }\n if (quizType === 'admin') {\n await dispatch(removeQuizAdmin(quiz.id))\n }\n if (quizType === 'template') {\n await dispatch(deleteTemplateQuiz(quiz.id));\n }\n if (quizType === 'customer') {\n await dispatch(removeQuizCustomer(quiz.id));\n }\n if (quizType === 'regular') {\n await deleteQuizMutation.mutate(quiz.id);\n }\n addNotification({\n type: 'success',\n title: 'Quiz deleted successfully',\n });\n }, [dispatch, quiz.id, quizType]);\n\n return (\n \n \n \n Delete Quiz\n \n \n Are you sure you want to delete Quiz: {quiz.title} ?\n \n\n \n \n \n \n \n \n );\n};\n","import { useMutation, useQueryClient } from \"react-query\";\nimport { deleteQuiz } from \"@/features/Quiz/api/getQuizzes\";\n\n\nexport const useDeleteQuiz = (closeModalFunction: () => void) => {\n const queryClient = useQueryClient();\n\n return useMutation({\n onError: (_, __, context: any) => {\n closeModalFunction();\n },\n onSuccess: () => {\n queryClient.invalidateQueries(['myQuiz']);\n closeModalFunction();\n },\n mutationFn: deleteQuiz,\n });\n};","import React, { ReactNode, useState } from 'react';\nimport { Tr, Td, Text, useDisclosure, Flex, Box, Tooltip, Spinner } from '@chakra-ui/react';\nimport { Link } from 'react-router-dom';\nimport { QuizType } from '@/redux/reducers/quizzes/quizSlice';\nimport { DeleteQuizModal } from '../DeleteQuizModal';\nimport { format } from 'date-fns';\nimport Icon from \"@/components/Icon\";\nimport { useQti } from \"@/api/qtiApi\";\nimport InstitutionsModal from \"@/features/Playlists/components/InstitutionsModal\";\nimport { usePlaylistCC } from \"@/api/ccApi\";\nimport { InstitutionModalTypes } from \"@/features/Playlists\";\nimport { usePlaylistScorm } from \"@/api/scormApi\";\n\ntype Props = {\n quiz: QuizType;\n};\n\nconst TextEl = ({ children }: { children: ReactNode }) => (\n \n {children}\n \n);\n\nexport const QuizListItem = ({ quiz }: Props) => {\n const { isOpen, onOpen, onClose } = useDisclosure();\n const { isOpen: isInstitutionsOpen, onOpen: onInstitutionsOpen, onClose: onInstitutionsClose } = useDisclosure();\n const [type, setType] = useState(null);\n\n const downloadType = \"from_quiz_template\"\n\n const { isLoading: isQtiLoading, handleQtiDownload } = useQti({\n qtiType: downloadType,\n qtiId: quiz?.id ?? 0,\n title: quiz?.title ?? ''\n });\n\n const { isLoading: isCCLoading, handleCCDownload } = usePlaylistCC({\n ccType: downloadType, ccId: quiz?.id ?? 0, title: quiz?.title ?? ''\n });\n\n const { isLoading: isScormLoading, handleScormDownload } = usePlaylistScorm({\n scormType: downloadType, scormId: quiz?.id ?? 0, playlistTitle: quiz?.title ?? ''\n });\n\n const handleOpenInstitutionsQti = () => {\n setType('qti');\n onInstitutionsOpen();\n };\n\n const handleOpenInstitutionsCC = () => {\n setType('cc');\n onInstitutionsOpen();\n };\n\n const handleOpenInstitutionsScorm = () => {\n setType('scorm');\n onInstitutionsOpen();\n };\n\n return (\n <>\n \n \n \n \n \n \n \n | \n \n \n {quiz.createdAt ? format(new Date(quiz.createdAt), 'MM/dd/yyyy') : '-'}\n \n | \n \n \n {quiz.countOfQuestions} Questions\n \n | \n\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n {isScormLoading ?\n \n :\n \n }\n \n \n \n \n \n \n \n \n \n {isCCLoading ?\n \n :\n \n }\n \n \n \n \n \n \n \n \n | \n
\n >\n );\n};\n","import { LoadingSpinner } from '@/components/LoadingSpinner';\nimport { uploadQuizQti } from '@/features/Quiz/api/getQuizzes';\nimport React, { ChangeEvent, ReactNode, useCallback, useEffect, useState } from 'react';\nimport {\n Box,\n Button,\n Flex,\n Input,\n InputGroup,\n InputLeftElement,\n InputRightElement,\n ResponsiveValue,\n Spinner,\n Table,\n Tbody,\n Td,\n Th,\n Thead,\n Tr,\n useToast,\n} from '@chakra-ui/react';\nimport { shallowEqual, useDispatch, useSelector } from 'react-redux';\nimport { AppDispatch, RootState } from '@/redux/store';\nimport {\n getAllQuizzes,\n resetQuizPages,\n selectQuizActivePage,\n selectQuizByPage,\n selectQuizLoading,\n selectQuizTotalPages,\n setQuizActivePage,\n} from '@/redux/reducers/quizzes/quizSlice';\nimport { useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { debounce } from '@/utils/helpers';\nimport { FaSearch } from 'react-icons/fa';\nimport { HiX } from 'react-icons/hi';\nimport { Link } from 'react-router-dom';\nimport { QuizListItem } from '@/features/Quiz/components/QuizListItem/QuizListItem';\nimport { Pagination } from '@/components/Pagination';\nimport { useFileUpload } from 'use-file-upload';\nimport * as yup from 'yup';\nimport Icon from '@/components/Icon';\n\nconst searchInputSchema = yup.object().shape({\n keyword: yup.string(),\n});\n\ntype SearchFormData = {\n keyword: string;\n};\n\nexport const ThEl = ({ children, w, align = 'center' }: { children: ReactNode; w: string; align?: ResponsiveValue }) => (\n \n {children}\n | \n);\n\nexport const ArticlesQuiz = () => {\n const dispatch = useDispatch();\n\n const activePage = useSelector(selectQuizActivePage, shallowEqual);\n const totalPages = useSelector(selectQuizTotalPages, shallowEqual);\n const quizzes = useSelector((state: RootState) => selectQuizByPage(state, activePage), shallowEqual);\n const isLoading = useSelector(selectQuizLoading, shallowEqual);\n const [, selectFile] = useFileUpload();\n const toast = useToast();\n const [loading, setLoading] = useState(false);\n\n const {\n register,\n handleSubmit,\n reset,\n formState: { isSubmitting },\n watch,\n setValue,\n } = useForm({\n resolver: yupResolver(searchInputSchema),\n defaultValues: {\n keyword: '',\n },\n });\n\n const onSearchKeywordSubmit = useCallback(\n (values: SearchFormData) => {\n dispatch(resetQuizPages());\n dispatch(setQuizActivePage(1));\n\n dispatch(\n getAllQuizzes({\n activePage: 1,\n activeSearchKeyword: values.keyword,\n })\n );\n },\n [dispatch]\n );\n\n const onSearchKeywordChange = debounce(\n useCallback(\n (e: ChangeEvent) => {\n e.preventDefault();\n\n setValue('keyword', e.target.value);\n\n dispatch(resetQuizPages());\n dispatch(setQuizActivePage(1));\n\n dispatch(\n getAllQuizzes({\n activePage: 1,\n activeSearchKeyword: e.target.value ?? '',\n })\n );\n },\n [dispatch]\n ),\n 300\n );\n\n const handleReset = useCallback(() => {\n reset();\n\n dispatch(\n getAllQuizzes({\n activePage: 1,\n activeSearchKeyword: '',\n })\n );\n }, []);\n\n const handlePaginationChange = useCallback(\n (page: number) => {\n dispatch(setQuizActivePage(page));\n },\n [dispatch]\n );\n\n useEffect(() => {\n dispatch(\n getAllQuizzes({\n activePage,\n activeSearchKeyword: '',\n })\n );\n }, [dispatch, activePage]);\n\n useEffect(\n () => () => {\n dispatch(setQuizActivePage(1));\n },\n [dispatch]\n );\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n {quizzes.length > 0 && (\n \n \n \n Title\n \n Date Created\n Questions\n Actions\n
\n \n )}\n \n {quizzes.length > 0 ? (\n quizzes.map((quiz) => )\n ) : (\n <>\n {!isLoading && (\n \n \n No list items\n | \n
\n )}\n >\n )}\n \n
\n\n {totalPages > 1 && (\n \n \n \n )}\n \n \n );\n};\n\nexport default ArticlesQuiz;\n","import { useAuth } from '@/context/AuthContext';\nimport React, { FC, useCallback, useEffect, useRef, useState } from 'react';\nimport {\n Modal,\n ModalOverlay,\n ModalContent,\n ModalHeader,\n ModalFooter,\n ModalBody,\n ModalCloseButton,\n Button,\n Textarea,\n Text,\n Box,\n} from '@chakra-ui/react';\nimport { QuizType } from '@/redux/reducers/quizzes/quizSlice';\nimport { useLocation } from 'react-router-dom';\nimport { AssignQuizToUsersRequest, SharedListAdminQuiz, SharedListMyQuiz } from '../../types';\nimport { useQuery } from 'react-query';\nimport { getSharedUsersAdminQuizById,getSharedCustomerQuizById } from '../../api/getQuizzes';\nimport { isNotNull } from '@/utils/helpers';\nimport { LoadingSpinner } from \"@/components/LoadingSpinner\";\nimport { ErrorBlock } from \"@/components/ErrorBlock\";\nimport Icon from '@/components/Icon';\n\ntype Props = {\n quiz: QuizType;\n isOpen?: boolean;\n onClose: () => void;\n onSubmit: (data: AssignQuizToUsersRequest) => void;\n errorMessage?: string;\n sharedList?: SharedListMyQuiz[] | SharedListAdminQuiz[] | null;\n isCustomerQuiz?:boolean;\n}\n\nexport const DistributeQuizModal: FC = ({ quiz, isOpen = false, onClose, onSubmit, errorMessage, sharedList ,isCustomerQuiz}: Props) => {\n const { user } = useAuth();\n const { pathname } = useLocation();\n const isMyQuiz = pathname.includes('my-quiz');\n const isSuperAdmin = user?.roles.includes('ROLE_SUPER_ADMIN');\n\n const { data, isLoading, isError } = useQuery(\n ['distributeEmail', quiz.id, sharedList],\n () =>!sharedList ? isCustomerQuiz?getSharedCustomerQuizById(quiz.id): getSharedUsersAdminQuizById(quiz.id) : null,\n {\n enabled: isOpen,\n }\n );\n\n const [emails, setEmails] = useState([]);\n const ref = useRef(null);\n\n const handleSubmit = useCallback(async (e: React.MouseEvent) => {\n e.preventDefault();\n\n await onSubmit({\n emails: emails,\n isAdminQuiz: quiz?.quizType ? quiz.quizType === \"adminQuiz\" : isSuperAdmin,\n });\n\n onClose();\n }, [onSubmit, onClose, emails]);\n\n const handleRemoveClick = useCallback((email: string) =>(e: React.MouseEvent) => {\n e.preventDefault();\n\n const newEmails = emails.filter((item) => item !== email)\n\n setEmails(newEmails);\n\n if (ref.current) {\n ref.current.value = newEmails?.join(', ') ?? '';\n }\n }, [emails]);\n\n const handleInputChange = useCallback((e: React.ChangeEvent) => {\n e.preventDefault();\n\n setEmails(e.target.value.match(/([a-zA-Z0-9-+._-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9._-]+)/gi) ?? []);\n }, []);\n\n useEffect(() => {\n if (isSuperAdmin && ref.current && !sharedList) {\n const oldEmails = data?.sharedList?.map((item) => item.user.email).filter(isNotNull);\n\n oldEmails && setEmails(oldEmails);\n ref.current.value = oldEmails?.join(', ') ?? '';\n } else if (sharedList?.length && ref.current) {\n const isAdminQuiz = quiz.quizType === \"adminQuiz\";\n const oldEmails = (isAdminQuiz && isSuperAdmin) || isMyQuiz\n ? (sharedList as SharedListAdminQuiz[]).map((item) => item?.user?.email)?.filter(isNotNull)\n : (sharedList as SharedListMyQuiz[]).map((item) => item?.email)?.filter(isNotNull);\n\n oldEmails && setEmails(oldEmails);\n ref.current.value = oldEmails?.join(', ') ?? '';\n }\n }, [data, isOpen, sharedList, isMyQuiz]);\n\n if (isError) return ;\n\n return (\n \n \n \n Share your Quiz {quiz.title}\n \n \n \n \n Enter one email address per line or add all emails as a comma separated string.\n \n\n {emails.map((item, key) => (\n \n \n {item}\n \n \n \n ))}\n \n\n {errorMessage &&\n \n {errorMessage}\n \n }\n\n \n \n \n \n \n );\n};\n","import { useAuth } from '@/context/AuthContext';\nimport { useNotificationStore } from '@/stores/notifications';\nimport React, { ReactNode, useCallback, useState, MouseEvent } from 'react';\nimport { Tr, Td, Text, useDisclosure, Flex, Box, Tooltip, Spinner } from '@chakra-ui/react';\nimport { Link, useLocation } from 'react-router-dom';\nimport { AssignQuizToUsersRequest, QuizLibrary } from '../../types';\nimport { DeleteQuizModal } from \"@/features/Quiz/components/DeleteQuizModal\";\nimport { DistributeQuizModal } from \"@/features/Quiz/components/DistributeQuizModal\";\nimport { saveSharedUsersAdminQuizById } from '@/features/Quiz/api/getQuizzes';\nimport Icon from \"@/components/Icon\";\nimport { format } from 'date-fns';\nimport { useQti } from \"@/api/qtiApi\";\nimport InstitutionsModal from \"@/features/Playlists/components/InstitutionsModal\";\nimport { usePlaylistCC } from \"@/api/ccApi\";\nimport { InstitutionModalTypes } from \"@/features/Playlists\";\nimport { usePlaylistScorm } from \"@/api/scormApi\";\n\ntype Props = {\n quiz: QuizLibrary\n isAdminQuiz: boolean\n}\n\nconst TextEl = ({ children }: { children: ReactNode }) => (\n \n {children}\n \n);\n\nexport const AdminQuizItem = ({ quiz, isAdminQuiz }: Props) => {\n const { isOpen, onOpen, onClose } = useDisclosure();\n const { user } = useAuth();\n const isSuperAdmin = user?.roles.includes('ROLE_SUPER_ADMIN');\n const { addNotification } = useNotificationStore();\n const { pathname } = useLocation();\n const isUserQuiz = pathname.includes('my-quiz');\n\n const [error, setError] = useState('');\n const [openDistributeQuiz, setOpenDistributeQuiz] = useState(false);\n const { isOpen: isInstitutionsOpen, onOpen: onInstitutionsOpen, onClose: onInstitutionsClose } = useDisclosure();\n const [type, setType] = useState(null);\n\n const downloadType = isAdminQuiz ? \"from_admin_quiz\" : \"from_quiz\"\n\n const handleDistributeQuizClose = useCallback(() => {\n setOpenDistributeQuiz(false);\n setError('')\n }, []);\n\n const handleDistributeQuizOpen = useCallback((e: MouseEvent) => {\n e.preventDefault();\n\n setOpenDistributeQuiz(true);\n }, []);\n\n const handleDistributeQuizSubmit = useCallback(async (data: AssignQuizToUsersRequest) => {\n try {\n const res = await saveSharedUsersAdminQuizById(quiz?.id ?? 0, data);\n if (res.already_shared.length) {\n addNotification({\n type: 'error',\n title: `Already shared: ${res.already_shared.join(', ')}`,\n });\n }\n if (res.shared.length) {\n addNotification({\n type: 'success',\n title: `Shared: ${res.shared.join(', ')}`,\n });\n }\n if (res.not_access.length) {\n addNotification({\n type: 'error',\n title: `Not access: ${res.not_access.join(', ')}`,\n });\n }\n if (res.not_found.length) {\n addNotification({\n type: 'error',\n title: `Not found: ${res.not_found.join(', ')}`,\n });\n }\n setError('');\n } catch (e: any) {\n setError(e?.message);\n throw e;\n }\n }, [isSuperAdmin]);\n\n const { isLoading: isQtiLoading, handleQtiDownload } = useQti({\n qtiType: downloadType,\n qtiId: quiz?.id ?? 0,\n title: quiz?.title ?? ''\n });\n\n const { isLoading: isCCLoading, handleCCDownload } = usePlaylistCC({\n ccType: downloadType, ccId: quiz?.id ?? 0, title: quiz?.title ?? ''\n });\n\n const { isLoading: isScormLoading, handleScormDownload } = usePlaylistScorm({\n scormType: downloadType, scormId: quiz?.id ?? 0, playlistTitle: quiz?.title ?? ''\n });\n\n const handleOpenInstitutionsCC = () => {\n setType('cc');\n onInstitutionsOpen();\n };\n\n const handleOpenInstitutionsScorm = () => {\n setType('scorm');\n onInstitutionsOpen();\n };\n\n const handleOpenInstitutionsQti = () => {\n setType('qti');\n onInstitutionsOpen();\n };\n\n return (\n <>\n \n \n \n \n \n \n \n {quiz.title}\n \n \n | \n\n {isUserQuiz &&\n \n \n {quiz?.restrictNonInstitutional ? 'Restricted': 'Open'}\n \n | \n }\n\n \n \n {quiz.tags && quiz.tags.length ? quiz.tags?.map((item) => item.title).join(', ') : '-'}\n \n | \n \n \n {quiz.countOfQuestions ? `${quiz.countOfQuestions} Questions` : '-'}\n \n | \n \n \n {quiz?.endDate ? format(new Date(quiz.endDate), 'MM/dd/yyyy') : '-'}\n \n | \n \n \n \n \n \n \n \n {quiz.editable && (\n \n \n \n \n \n )}\n\n \n \n \n \n \n \n \n {isScormLoading ?\n \n :\n \n }\n \n \n \n \n \n \n \n \n \n {isCCLoading ?\n \n :\n \n }\n \n \n \n \n \n \n \n\n \n | \n
\n >\n );\n};\n","import React, { useCallback, useEffect, ChangeEvent, useState } from 'react';\nimport { useQuery } from 'react-query';\nimport { useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport {\n Box,\n Flex,\n Input,\n InputGroup,\n InputLeftElement,\n InputRightElement,\n Table,\n Tbody, Td,\n Thead,\n Tr,\n Spinner as SpinnerChakra,\n Button,\n Alert,\n AlertIcon,\n} from '@chakra-ui/react';\nimport { FaSearch } from 'react-icons/fa';\nimport { HiX } from 'react-icons/hi';\nimport * as yup from 'yup';\nimport { debounce } from '@/utils/helpers';\nimport { Pagination } from \"@/components/Pagination\";\nimport { ThEl } from \"@/features/Quiz/components/ArticlesQuiz\";\nimport { Link } from \"react-router-dom\";\nimport { AdminQuizItem } from \"@/features/Quiz/components/AdminQuizItem\";\nimport { useAuth } from '@/context/AuthContext';\nimport { buildQuizzesParams, getMyQuizzes } from '@/features/Quiz/api/getQuizzes';\nimport Icon from \"@/components/Icon\";\n\nconst searchInputSchema = yup.object().shape({\n keyword: yup.string(),\n});\n\ntype SearchFormData = {\n keyword: string;\n};\n\nexport const MyQuiz = () => {\n const [activePage, setActivePage] = useState(1);\n const [activeSearchKeyword, setActiveSearchKeyword] = useState('');\n\n const { user } = useAuth();\n const isSuperAdmin = user?.roles.includes('ROLE_SUPER_ADMIN');\n\n const { data, isLoading, isError, error } = useQuery(\n ['myQuiz', user, activePage, activeSearchKeyword],\n () => getMyQuizzes(buildQuizzesParams(activePage, activeSearchKeyword, null, 20)),\n {\n useErrorBoundary: (error: any) => error.response?.status >= 400,\n }\n );\n\n const {\n register,\n handleSubmit,\n reset,\n formState: { isSubmitting },\n watch,\n setValue,\n } = useForm({\n resolver: yupResolver(searchInputSchema),\n defaultValues: {\n keyword: '',\n },\n });\n\n const onSearchKeywordSubmit = useCallback(\n (values: SearchFormData) => {\n setActivePage(1);\n setActiveSearchKeyword(values.keyword ?? '');\n },\n [activePage, activeSearchKeyword]\n );\n\n const onSearchKeywordChange = debounce(useCallback(\n (e: ChangeEvent) => {\n e.preventDefault();\n\n setValue('keyword', e.target.value);\n setActivePage(1);\n setActiveSearchKeyword(e.target.value ?? '');\n\n },\n [activePage, activeSearchKeyword]\n ), 300);\n\n const handleReset = useCallback(() => {\n reset();\n setActivePage(1);\n setActiveSearchKeyword('');\n }, []);\n\n const handlePaginationChange = useCallback(\n (page: number) => {\n setActivePage(page);\n },\n []\n );\n\n useEffect(() => () => {\n setActivePage(1);\n }, [activeSearchKeyword]);\n\n if (isError && error?.message.toLowerCase() === 'access denied') {\n return (\n \n \n You have no access to quizzes based on your subscription level\n \n );\n }\n\n return (\n \n \n \n \n \n \n \n \n \n {data && data.result?.length > 0 && (\n \n \n \n Title\n \n Access\n \n Subjects\n \n Questions\n Deadline\n Actions\n
\n \n )}\n \n { data && data.result?.length > 0 ? (\n data.result?.map((quiz) => (\n )\n )\n ) : (\n <>\n {!isLoading && (\n \n \n No list items\n | \n
\n )}\n >\n )}\n \n
\n\n {data && data?.navigation?.total_pages > 1 && (\n \n \n \n )}\n \n \n );\n};","import Icon from '@/components/Icon';\nimport { useAuth } from '@/context/AuthContext';\nimport { useNotificationStore } from '@/stores/notifications';\nimport React, { ReactNode, useCallback, useState, MouseEvent, Fragment } from 'react';\nimport { Tr, Td, Text, useDisclosure, Flex, Tooltip, Box, Spinner } from '@chakra-ui/react';\nimport { Link } from 'react-router-dom';\nimport {\n AssignQuizToUsersRequest,\n Quiz,\n SharedListMyQuiz,\n QuizLibrary,\n} from '../../types';\nimport { DeleteQuizModal } from \"@/features/Quiz/components/DeleteQuizModal\";\nimport { DistributeQuizModal } from \"@/features/Quiz/components/DistributeQuizModal\";\nimport { saveSharedUsersAdminQuizById } from '@/features/Quiz/api/getQuizzes';\nimport { format } from 'date-fns';\nimport InstitutionsModal from \"@/features/Playlists/components/InstitutionsModal\";\nimport { useQti } from \"@/api/qtiApi\";\nimport { usePlaylistCC } from \"@/api/ccApi\";\nimport { InstitutionModalTypes } from \"@/features/Playlists\";\nimport { usePlaylistScorm } from \"@/api/scormApi\";\n\ntype Props = {\n quiz: QuizLibrary;\n isAdminQuiz: boolean;\n}\n\nconst TextEl = ({ children }: { children: ReactNode }) => (\n \n {children}\n \n);\n\nexport const SharedQuizItem = ({ quiz, isAdminQuiz }: Props) => {\n const { isOpen, onOpen, onClose } = useDisclosure();\n const { isOpen: isInstitutionsOpen, onOpen: onInstitutionsOpen, onClose: onInstitutionsClose } = useDisclosure();\n const [type, setType] = useState(null);\n const { addNotification } = useNotificationStore();\n\n const { user } = useAuth();\n const isSuperAdmin = user?.roles.includes('ROLE_SUPER_ADMIN');\n\n const downloadType = isAdminQuiz ? \"from_admin_quiz\" : \"from_quiz\"\n\n const [error, setError] = useState('');\n const [openDistributeQuiz, setOpenDistributeQuiz] = useState(false);\n\n const handleDistributeQuizClose = useCallback(() => {\n setOpenDistributeQuiz(false);\n setError('')\n }, []);\n\n const handleDistributeQuizOpen = useCallback((e: MouseEvent) => {\n e.preventDefault();\n\n setOpenDistributeQuiz(true);\n }, []);\n\n const handleDistributeQuizSubmit = useCallback(async (data: AssignQuizToUsersRequest) => {\n try {\n const res = await saveSharedUsersAdminQuizById(quiz?.id ?? 0, data);\n if (res.already_shared.length) {\n addNotification({\n type: 'error',\n title: `Already shared: ${res.already_shared.join(', ')}`,\n });\n }\n if (res.shared.length) {\n addNotification({\n type: 'success',\n title: `Shared: ${res.shared.join(', ')}`,\n });\n }\n if (res.not_access.length) {\n addNotification({\n type: 'error',\n title: `Not access: ${res.not_access.join(', ')}`,\n });\n }\n if (res.not_found.length) {\n addNotification({\n type: 'error',\n title: `Not found: ${res.not_found.join(', ')}`,\n });\n }\n setError('');\n } catch (e: any) {\n setError(e?.message);\n throw e;\n }\n }, []);\n\n const { isLoading: isQtiLoading, handleQtiDownload } = useQti({\n qtiType: downloadType,\n qtiId: quiz?.id ?? 0,\n title: quiz?.title ?? ''\n });\n\n const { isLoading: isCCLoading, handleCCDownload } = usePlaylistCC({\n ccType: downloadType, ccId: quiz?.id ?? 0, title: quiz?.title ?? ''\n });\n\n const { isLoading: isScormLoading, handleScormDownload } = usePlaylistScorm({\n scormType: downloadType, scormId: quiz?.id ?? 0, playlistTitle: quiz?.title ?? ''\n });\n\n const handleOpenInstitutionsQti = () => {\n setType('qti');\n onInstitutionsOpen();\n };\n\n const handleOpenInstitutionsCC = () => {\n setType('cc');\n onInstitutionsOpen();\n };\n\n const handleOpenInstitutionsScorm = () => {\n setType('scorm');\n onInstitutionsOpen();\n };\n\n return (\n <>\n \n \n \n \n \n \n \n {quiz?.title}\n \n \n | \n \n {quiz?.sharedList\n ? quiz?.sharedList?.map((item, index) => (\n \n \n {item.user.firstName} {item.user.lastName} | {item.user.email}\n \n \n \n ))\n : quiz?.sharedUserList && quiz?.sharedUserList?.map((item, index) => (\n \n \n {item?.first_name} {item?.last_name} | {item?.email}\n \n \n \n ))\n }\n | \n \n \n {quiz?.createdAt ? format(new Date(quiz?.createdAt), 'MM/dd/yyyy') : '-'}\n \n | \n \n \n {quiz?.countOfQuestions ? `${quiz?.countOfQuestions} Questions` : '-'}\n \n | \n \n \n {quiz?.endDate ? format(new Date(quiz?.endDate), 'MM/dd/yyyy') : '-'}\n \n | \n\n \n \n\n \n \n {isScormLoading ?\n \n :\n \n }\n \n \n \n \n \n \n \n \n \n {isCCLoading ?\n \n :\n \n }\n \n \n \n \n \n \n \n \n | \n
\n >\n );\n};\n","import { QuizLibrary, QuizLibraryResponse, QuizSharedByMeType } from '@/features/Quiz';\nimport { SharedQuizItem } from '@/features/Quiz/components/SharedQuizItem';\nimport React, { useCallback, useEffect, ChangeEvent, useState } from 'react';\nimport { useQuery } from 'react-query';\nimport { useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport {\n Box,\n Flex,\n Input,\n InputGroup,\n InputLeftElement,\n InputRightElement,\n Table,\n Tbody, Td,\n Thead,\n Tr,\n Spinner as SpinnerChakra,\n Button,\n Alert,\n AlertIcon,\n} from '@chakra-ui/react';\nimport { FaSearch } from 'react-icons/fa';\nimport { HiX } from 'react-icons/hi';\nimport * as yup from 'yup';\nimport { debounce } from '@/utils/helpers';\nimport { Pagination } from \"@/components/Pagination\";\nimport { ThEl } from \"@/features/Quiz/components/ArticlesQuiz\";\nimport { Link } from 'react-router-dom';\nimport { useAuth } from '@/context/AuthContext';\nimport {\n getSharedQuizzes,\n buildQuizzesParams,\n getSharedUserQuizzes,\n} from '@/features/Quiz/api/getQuizzes';\nimport Icon from \"@/components/Icon\";\n\nconst searchInputSchema = yup.object().shape({\n keyword: yup.string(),\n});\n\ntype SearchFormData = {\n keyword: string;\n};\n\nexport const SharedQuiz = () => {\n const [activePage, setActivePage] = useState(1);\n const [activeSearchKeyword, setActiveSearchKeyword] = useState('');\n const [quizzes, setQuizzes] = useState([]);\n\n const { user } = useAuth();\n const isSuperAdmin = user?.roles.includes('ROLE_SUPER_ADMIN');\n\n const { data: dataForSuperAdmin, isLoading: isLoadingSuperAdminData, isError: isErrorSuperAdminData, error: errorSuperAdminData } = useQuery(\n ['sharedQuizForSuperAdmin', user, activePage, activeSearchKeyword],\n () => isSuperAdmin ? getSharedQuizzes(buildQuizzesParams(activePage, activeSearchKeyword, false, 20)) : null,\n {\n useErrorBoundary: (error: any) => error.response?.status >= 400,\n },\n );\n\n const { data, isLoading, isError, error } = useQuery(['sharedQuizCSUser', user, activePage, activeSearchKeyword],\n () => !isSuperAdmin ? getSharedUserQuizzes() : null,\n {\n useErrorBoundary: (error: any) => error.response?.status >= 400,\n },\n );\n\n const {\n register,\n handleSubmit,\n reset,\n formState: { isSubmitting },\n watch,\n setValue,\n } = useForm({\n resolver: yupResolver(searchInputSchema),\n defaultValues: {\n keyword: '',\n },\n });\n\n const onSearchKeywordSubmit = useCallback(\n (values: SearchFormData) => {\n setActivePage(1);\n setActiveSearchKeyword(values.keyword ?? '');\n },\n [activePage, activeSearchKeyword]\n );\n\n const onSearchKeywordChange = debounce(useCallback(\n (e: ChangeEvent) => {\n e.preventDefault();\n\n setValue('keyword', e.target.value);\n setActivePage(1);\n setActiveSearchKeyword(e.target.value ?? '');\n\n },\n [activePage, activeSearchKeyword]\n ), 300);\n\n const handleReset = useCallback(() => {\n reset();\n setActivePage(1);\n setActiveSearchKeyword('');\n }, []);\n\n const handlePaginationChange = useCallback(\n (page: number) => {\n setActivePage(page);\n },\n []\n );\n\n useEffect(() => () => {\n setActivePage(1);\n }, [activeSearchKeyword]);\n\n useEffect(() => {\n isSuperAdmin && dataForSuperAdmin ? setQuizzes(dataForSuperAdmin.result) : data ? setQuizzes(data) : [];\n }, [data, dataForSuperAdmin, isSuperAdmin]);\n\n if (isError && error?.message.toLowerCase() === 'access denied') {\n return (\n \n \n You have no access to quizzes based on your subscription level\n \n );\n }\n\n return (\n \n \n \n {dataForSuperAdmin &&\n \n }\n {isSuperAdmin &&\n \n }\n \n \n \n \n {quizzes?.length > 0 && (\n \n \n \n Title\n \n \n Shared with\n \n \n Date Created\n \n Questions\n Deadline\n Actions\n
\n \n )}\n \n {quizzes?.length > 0 ? (\n quizzes.map((quiz, index) =>\n )\n ) : (\n <>\n {!isLoading && (\n \n \n No list items\n | \n
\n )}\n >\n )}\n \n
\n\n {isSuperAdmin && dataForSuperAdmin?.navigation && dataForSuperAdmin.navigation.total_pages > 1 && (\n \n \n \n )}\n \n \n );\n};","import React, { MouseEvent, useCallback } from 'react';\nimport {\n Button,\n Box,\n FormErrorMessage,\n FormControl,\n Flex,\n} from '@chakra-ui/react';\nimport { useFieldArray, useFormContext } from 'react-hook-form';\nimport { Draggable, Droppable } from 'react-beautiful-dnd';\nimport { Activity, QuizFormData } from '../../types';\nimport Icon from '@/components/Icon';\n\nexport const LeftActivitiesFieldArray = () => {\n const { formState: { errors }, control, watch } = useFormContext();\n\n const { fields, append, replace } = useFieldArray({\n control,\n name: \"activities\"\n });\n\n const activities = watch(\"activities\");\n\n const handleAddActivities = useCallback((e: MouseEvent) => {\n e.preventDefault();\n\n append({\n originId: null,\n title: `Activity ${fields.length + 1}`,\n sortIndex: fields.length + 1,\n isSelect: false,\n items: [],\n });\n }, [append, fields.length]);\n\n const handleRemoveActivities = useCallback((index: number) => (e: MouseEvent) => {\n e.preventDefault();\n\n const list = activities.filter((_, key) => key !== index);\n\n if (list.some((item) => item.isSelect)) {\n const newList = list.map((item, key) => ({ ...item, sortIndex: key + 1 }));\n\n replace(newList);\n } else {\n const newList = list.map((item, key) => {\n if (key === 0) {\n return {\n ...item,\n sortIndex: key + 1,\n isSelect: true\n };\n }\n return { ...item, sortIndex: key + 1 };\n });\n\n replace(newList);\n }\n }, [replace, activities]);\n\n const handleSelect = useCallback((index: number, item: Activity) => (e: MouseEvent) => {\n e.preventDefault();\n\n if (!item.isSelect) {\n replace(\n activities.map((activity) => {\n if (activity.sortIndex === index) {\n return { ...activity, isSelect: true};\n }\n\n if (activity.isSelect) {\n return { ...activity, isSelect: false};\n }\n return activity;\n })\n );\n }\n }, [replace, activities]);\n\n return (\n <>\n \n \n Activities\n \n \n \n \n \n {(provided) => (\n \n {fields.map((item, index) => (\n \n {(provided) => (\n \n \n \n \n\n \n \n \n {errors.activities && errors.activities[index]?.title?.message}\n \n \n\n {fields.length > 1 &&\n \n }\n \n )}\n \n ))}\n {provided.placeholder}\n
\n )}\n \n \n >\n );\n}\n","import { QuizzesArticles } from '@/types';\nimport React, { useCallback } from 'react';\nimport { Button, Td, Text, Tr } from '@chakra-ui/react';\nimport parse from 'html-react-parser';\n\ninterface Props {\n article: QuizzesArticles;\n onSelectArticle: (id: number) => void;\n}\n\nexport const ArticlesListItem = ({ article, onSelectArticle }: Props) => {\n const { domain } = article;\n\n const handleArticleSelect = useCallback(() => {\n onSelectArticle(domain?.id);\n }, [domain?.id, onSelectArticle])\n\n return (\n <>\n \n {domain?.id} | \n \n \n {parse(domain?.title)}\n \n | \n \n {domain?.articleType}\n | \n \n \n | \n
\n >\n );\n};\n","import React, { ChangeEvent, useCallback, useEffect, useState } from 'react';\nimport {\n Table,\n Thead,\n Tbody,\n Tr,\n Th,\n Spinner,\n InputGroup,\n InputLeftElement,\n Input,\n InputRightElement,\n Box,\n Td,\n} from '@chakra-ui/react';\nimport { useForm } from \"react-hook-form\";\nimport { yupResolver } from \"@hookform/resolvers/yup\";\nimport { useQuery } from 'react-query';\nimport * as yup from \"yup\";\nimport { HiX } from \"react-icons/hi\";\n\nimport { debounce } from \"@/utils/helpers\";\nimport { Pagination } from '@/components/Pagination';\nimport Icon from \"@/components/Icon\";\nimport { ArticlesListItem } from \"@/features/Quiz/components/ArticlesListItem\";\nimport { buildQuizzesArticleListParams, postQuizzesArticles } from '@/features/Quiz/api/getArticles';\n\ntype Props = {\n onSelectArticle: (id: number) => void;\n};\n\nlet searchInputSchema = yup.object().shape({\n keyword: yup.string(),\n});\n\nexport type SearchFormData = {\n keyword: string;\n};\n\nexport const ArticlesList = ({onSelectArticle}: Props) => {\n const [activePage, setActivePage] = useState(1);\n const [total, setTotal] = useState(0);\n const [activeSearchKeyword, setActiveSearchKeyword] = useState('');\n\n const { isFetching, data: articlesData, isLoading } = useQuery(['search', activeSearchKeyword, activePage], () =>\n postQuizzesArticles(\n buildQuizzesArticleListParams(activePage, activeSearchKeyword, 20, false, null, 0)\n )\n );\n\n const { register, reset, setValue, formState: { isSubmitting } } = useForm({\n resolver: yupResolver(searchInputSchema),\n defaultValues: {\n keyword: '',\n }\n });\n\n const onSearchKeywordChange = debounce(useCallback(\n (e: ChangeEvent) => {\n e.preventDefault();\n\n setActivePage(1);\n setActiveSearchKeyword(/^-?\\d+$/.test(e.target.value ?? '') ? Number(e.target.value) : e.target.value ?? '');\n setValue('keyword', e.target.value);\n },\n []\n ), 500);\n\n const handleReset = useCallback(() => {\n reset();\n\n setActivePage(1);\n setActiveSearchKeyword('');\n setValue('keyword', '');\n }, []);\n\n useEffect(() => {\n if (!articlesData?.result) {\n return setTotal(0);\n }\n\n if (typeof articlesData?.navigation?.total_pages === 'number') {\n setTotal(articlesData?.navigation?.total_pages ?? 0);\n } else {\n articlesData?.navigation?.total_items\n && articlesData?.navigation?.items_on_page\n && setTotal((Math.ceil(articlesData.navigation.total_items / articlesData.navigation.items_on_page)))\n }\n }, [articlesData?.navigation?.total_items, articlesData?.navigation?.items_on_page]);\n\n return (\n <>\n {isLoading ?\n \n :\n \n \n \n \n \n ID | \n Title | \n Type | \n Actions | \n
\n \n \n {articlesData?.result?.length ?\n articlesData.result.map((article) =>\n \n ) : (\n \n No articles found | \n
\n )\n }\n \n
\n \n }\n {articlesData && total > 1 &&\n setActivePage(page)}\n />\n }\n >\n );\n};\n","import { axios } from '@/lib/axios';\nimport { API_URL } from \"@/config\";\nimport {\n ArticleCtx,\n QuizzesArticlesResponse,\n} from '@/types';\n\nexport const getArticle = (id: number): Promise => {\n return axios.get(`${API_URL}/api/free/article/en/${id}`)\n};\n\ntype FilterCollection = {\n bool_operator?: string;\n condition?: {\n property?: string;\n operator: string;\n value: string | number | boolean;\n };\n};\n\ntype GetArticleListBodyStructure = {\n navigation: {\n page: number;\n itemsOnPage: number;\n };\n bySection?: null | boolean;\n contentType?: 'science' | 'journal';\n totalCount: boolean;\n filter: {\n collection: FilterCollection[] | null;\n };\n sort?: string[][];\n};\n\nexport const buildQuizzesArticleListParams = (\n activePage: number,\n activeSearchKeyword: string | number,\n itemsOnPage = 20,\n bySection: null | boolean,\n contentType?: 'science' | 'journal' | null,\n sectionId?: number\n) => {\n return {\n navigation: {\n page: activePage,\n itemsOnPage,\n },\n ...(contentType ? { contentType: contentType } : null),\n bySection: bySection || null,\n withTemplate: activeSearchKeyword ? null : true,\n totalCount: true,\n filter: {\n collection: [\n ...(activeSearchKeyword\n ? [\n {\n bool_operator: 'and',\n condition: {\n property: Number(activeSearchKeyword) ? 'domain_id' : 'title',\n operator: Number(activeSearchKeyword) ? 'equals' : 'contains',\n value: Number(activeSearchKeyword) ? Number(activeSearchKeyword) : activeSearchKeyword || '',\n },\n },\n ]\n : []),\n ...(sectionId\n ? [\n {\n bool_operator: 'and',\n condition: {\n property: 'id',\n operator: 'equals',\n value: sectionId,\n },\n },\n ]\n : []),\n ],\n },\n };\n};\n\nexport const postQuizzesArticles = (data: GetArticleListBodyStructure): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/article_list`, data);\n};\n","import React from 'react';\nimport {\n Modal,\n ModalOverlay,\n ModalContent,\n ModalHeader,\n ModalFooter,\n ModalBody,\n ModalCloseButton,\n Button\n} from '@chakra-ui/react'\nimport {ArticlesList} from \"@/features/Quiz/components/ArticlesList\";\n\ntype Props = {\n isOpen: boolean;\n onClose: () => void;\n onSelectArticle: (id: number) => void;\n};\n\nexport const ArticlesModal = ({isOpen, onClose, onSelectArticle}: Props) => {\n return (\n \n \n \n Articles\n \n \n \n \n \n \n \n \n \n );\n};\n","import React, { MouseEvent, useCallback, useEffect, useState } from 'react';\nimport {\n Button,\n Box,\n FormLabel,\n Input,\n FormErrorMessage,\n FormControl,\n FormHelperText,\n Select,\n Flex,\n ModalOverlay,\n ModalContent,\n ModalHeader,\n ModalCloseButton,\n ModalBody,\n ModalFooter,\n Modal,\n NumberInput,\n NumberDecrementStepper,\n NumberInputField,\n NumberIncrementStepper,\n NumberInputStepper,\n useDisclosure,\n Text,\n Switch,\n Tooltip,\n Menu,\n MenuButton,\n MenuList,\n MenuItemOption,\n MenuOptionGroup,\n} from '@chakra-ui/react';\nimport { useFormContext } from 'react-hook-form';\nimport { Link, useNavigate, useLocation } from 'react-router-dom';\nimport DatePicker from 'react-datepicker';\nimport 'react-datepicker/dist/react-datepicker.css';\nimport { shallowEqual, useDispatch, useSelector } from 'react-redux';\nimport { getQuizTags, selectAllTags, selectTagsTotal } from '@/redux/reducers/quizzes/tag/tagSlice';\nimport { AppDispatch } from '@/redux/store';\nimport { LeftActivitiesFieldArray } from '../LeftActivitiesFieldArray';\nimport moment from 'moment';\nimport { ArticlesModal } from '@/features/Quiz/components/ArticlesModal';\nimport Icon from '@/components/Icon';\nimport { useQuery } from 'react-query';\nimport { getArticle } from '@/features/Quiz/api/getArticles';\nimport { ArticleCtx } from '@/types';\n\nconst typeOptions: Record = {\n graded: 'Graded',\n ungraded: 'Ungraded',\n};\n\ntype Props = {\n isLibrary?: boolean;\n isEdit?: boolean;\n isUserQuiz?: boolean;\n isCustomerQuiz?: boolean;\n onSubmit: () => void;\n isFormSubmitting: boolean;\n isAssignSomeone?: boolean;\n};\n\nexport const LeftCreateQuiz = ({\n isLibrary = false,\n isEdit = false,\n isUserQuiz = false,\n onSubmit,\n isFormSubmitting,\n isAssignSomeone = false,\n isCustomerQuiz = false,\n}: Props) => {\n const { isOpen: isOpenArticleModal, onOpen: onOpenArticleModal, onClose: onCloseArticleModal } = useDisclosure();\n\n const navigate = useNavigate();\n const { pathname } = useLocation();\n const dispatch = useDispatch();\n\n const {\n register,\n formState: { errors, isSubmitting },\n setValue,\n getValues,\n watch,\n } = useFormContext();\n\n const { data } = useQuery(\n 'article',\n () => {\n if (!isUserQuiz && !isLibrary && watch().article) {\n return getArticle(Number(watch().article));\n }\n return null;\n },\n {\n enabled: Boolean(!isUserQuiz && !isLibrary && watch().article),\n useErrorBoundary: (error: any) => error.response?.status >= 400,\n }\n );\n\n const filterPassedTime = (time: Date) => {\n const currentDate = new Date();\n const selectedDate = new Date(time);\n\n return currentDate.getTime() < selectedDate.getTime();\n };\n\n const filterPassedTimeByStartDate = (time: Date) => {\n const currentDate = new Date(time);\n const selectedDate = new Date(getValues('startDate'));\n\n return currentDate.getTime() > selectedDate.getTime();\n };\n\n const tagsOptions = useSelector(selectAllTags, shallowEqual);\n const totalTags = useSelector(selectTagsTotal, shallowEqual);\n\n const quizTemplateTag = tagsOptions.filter((tag) => tag.title.toLowerCase() === 'biology');\n const isCreatePage = pathname.includes('create');\n\n const [isOpen, setOpen] = useState(false);\n const [tags, setTags] = useState(getValues('tags'));\n\n const datePickerConfig = {\n placeholderText: 'mm.dd.yyyy hh:mm',\n dateFormat: 'MM.dd.yyyy hh:mm a',\n showTimeSelect: true,\n };\n\n const handleCloseModal = useCallback(() => {\n setOpen(false);\n setTags([]);\n }, []);\n\n const handleOpenModal = useCallback((e: MouseEvent) => {\n e.preventDefault();\n setOpen(true);\n }, []);\n\n const handleAddSubject = useCallback(\n (id: number) => (e: MouseEvent) => {\n e.preventDefault();\n setTags((state) => (state.includes(id) ? state.filter((oldId) => oldId !== id) : [...state, id]));\n },\n []\n );\n\n const handleSaveSubject = useCallback(\n (e: MouseEvent) => {\n e.preventDefault();\n setValue('tags', tags);\n setOpen(false);\n },\n [tags]\n );\n\n const handleArticleSelect = useCallback(\n (id: number | null) => {\n setValue('article', id);\n onCloseArticleModal();\n },\n [setValue, onCloseArticleModal]\n );\n\n useEffect(() => {\n if (!isLibrary && isCreatePage && quizTemplateTag.length) {\n setValue('tags', [quizTemplateTag[0].id]);\n setTags([quizTemplateTag[0].id]);\n }\n }, [isCreatePage, isLibrary, tagsOptions]);\n\n const handleRemoveArticle = useCallback(\n (e: MouseEvent) => {\n e.preventDefault();\n setValue('article', null);\n },\n [setValue]\n );\n\n const handleBackToQuizzesClick = useCallback(\n (e: MouseEvent) => {\n e.preventDefault();\n\n navigate('/quiz', {\n replace: true,\n state: {\n tabMyQuizzes: true,\n },\n });\n },\n [navigate]\n );\n\n useEffect(() => {\n if (!totalTags) {\n dispatch(getQuizTags());\n }\n }, [totalTags, dispatch]);\n\n return (\n <>\n {!isLibrary && }\n \n \n \n \n {isEdit ? 'Edit' : 'Create'} Quiz\n \n \n Quiz Details\n \n {!isLibrary && !isUserQuiz && (\n \n {!watch().article ? (\n } onClick={onOpenArticleModal} variant=\"brand\" size=\"sm\" width=\"100%\">\n Select Article\n \n ) : (\n <>\n {data?.domain ? (\n <>\n \n \n >\n ) : (\n ''\n )}\n >\n )}\n \n )}\n\n \n \n Title *\n \n \n {errors.title?.message}\n \n\n {isLibrary && (\n \n \n Quiz Type *\n \n \n {errors.type?.message}\n \n )}\n\n {!isUserQuiz && (\n <>\n \n \n Subjects\n \n \n \n\n {!!tags.length ? (\n \n {tagsOptions\n .filter((tag) => getValues('tags').includes(tag.id))\n .map((tag) => (\n \n ))}\n \n ) : (\n Select a Subject\n )}\n >\n )}\n\n {isLibrary && (\n <>\n \n \n Timing\n \n \n\n \n \n Start Date\n \n setValue('startDate', date)}\n minDate={new Date()}\n filterTime={filterPassedTime}\n />\n {errors.startDate?.message}\n \n The date and time selected reflect your local time zone.\n \n \n\n \n \n End Date\n \n setValue('endDate', date)}\n minDate={moment(getValues('startDate')).isAfter(new Date()) ? getValues('startDate') : new Date()}\n filterTime={filterPassedTimeByStartDate}\n />\n {errors.endDate?.message}\n \n The date and time selected reflect your local time zone. Leave the date field blank to allow students to participate\n indefinitely.\n \n \n\n \n \n Quiz Duration (in minutes)\n \n \n \n \n \n \n \n \n {errors.duration?.message}\n \n Entering a value of 0 will have no time limit\n \n \n >\n )}\n\n {isLibrary && !isCustomerQuiz && }\n\n {isUserQuiz && (\n \n \n \n \n Access Type:\n \n \n \n \n \n \n {!!watch('restrictNonInstitutional')\n ? 'Only students from your institute can take this quiz using their institutional email'\n : 'Students can take quiz using any email address'}\n \n \n \n \n \n )}\n\n {isUserQuiz ? (\n \n \n Enable Closed Caption\n \n \n \n ) : null}\n\n \n\n \n \n \n Choose relevant subjects\n \n\n \n {tagsOptions.map((tag) => {\n return (\n \n );\n })}\n \n\n \n \n \n \n \n \n >\n );\n};\n","import React, { ChangeEvent, useEffect } from 'react';\nimport {\n Text,\n Modal,\n ModalBody,\n ModalCloseButton,\n ModalContent,\n ModalOverlay,\n InputGroup,\n Input,\n InputRightElement,\n Flex,\n Image,\n Stack,\n Checkbox,\n Box,\n CheckboxGroup,\n} from '@chakra-ui/react';\nimport { useCallback, useState } from 'react';\nimport { FaSearch } from 'react-icons/fa';\nimport { getQuizDataByPlaylistId } from './../../api/getQuizzes';\nimport { getPlaylists } from '@/features/Playlists/api';\nimport { Playlist } from '@/features/Playlists/types';\nimport { useFieldArray, useFormContext } from 'react-hook-form';\nimport { ImportPlaylistQuizItem, PlayListQuizItem, QuizFormData } from '@/features/Quiz/types';\nimport { List, AutoSizer, CellMeasurer, CellMeasurerCache } from 'react-virtualized';\nimport { MeasuredCellParent } from 'react-virtualized/dist/es/CellMeasurer';\nimport Icon from '@/components/Icon';\n\ntype Props = {\n isOpen: boolean;\n onClose: () => void;\n indexActivity: number;\n};\n\ntype ListItemData = {\n id: number;\n title: string;\n};\n\nconst sortFunction = (a: ListItemData, b: ListItemData) => {\n return b.id - a.id;\n};\nconst ImportPlaylist = ({ isOpen, onClose, indexActivity }: Props) => {\n const [totalPlaylists, setTotalPlaylists] = useState(0);\n const [playlistsList, setPlaylistsList] = useState([]);\n const defaultPlaylistsList = playlistsList.map((listItem) => {\n return { id: listItem.id, title: listItem.domain.title };\n });\n const [importVideos, setImportVideos] = useState(true);\n const [importTemplateQuestions, setImportTemplateQuestions] = useState(true);\n const [leftList, setLeftList] = useState([]);\n const [rightList, setRightList] = useState([]);\n const leftCache = React.useRef(\n new CellMeasurerCache({\n fixedWidth: true,\n })\n );\n const rightCache = React.useRef(\n new CellMeasurerCache({\n fixedWidth: true,\n })\n );\n const { watch, control } = useFormContext();\n\n const { append, remove } = useFieldArray({\n control,\n name: `activities.${indexActivity}.items`,\n });\n\n const activityItems = watch(`activities.${indexActivity}.items`);\n\n const buildPlaylistParams = useCallback((totalItems: number, activeSearchKeyword: string | number) => {\n return {\n navigation: {\n page: 1,\n itemsOnPage: totalItems,\n },\n totalCount: true,\n filter: {\n collection: [\n ...(activeSearchKeyword\n ? [\n {\n bool_operator: 'or',\n condition: {\n property: 'title',\n operator: 'contains',\n value: activeSearchKeyword ?? 0,\n },\n },\n ]\n : []),\n ],\n },\n sort: [['id', 'desc']],\n };\n }, []);\n\n const initFormValues = useCallback(\n (data: ImportPlaylistQuizItem[]) => {\n return data.map((item: ImportPlaylistQuizItem, index: number) => {\n return {\n originId: null,\n isSelect: true,\n sortIndex: activityItems.length + index + 1,\n type: item.type,\n title: item.title,\n image: item.image ?? null,\n isMultiple: item.isMultiple ?? false,\n rightAnswer: item.rightAnswer ?? [1],\n article: item.article ?? null,\n textOptions: item.textOptions\n ? item.textOptions.map((textOption) => {\n const { id: customTextOptionId, ...dataTextOption } = textOption;\n\n return {\n ...dataTextOption,\n originId: customTextOptionId,\n };\n })\n : [\n {\n originId: 1,\n text: '',\n },\n {\n originId: 2,\n text: '',\n },\n {\n originId: 3,\n text: '',\n },\n {\n originId: 4,\n text: '',\n },\n ],\n };\n });\n },\n [activityItems]\n );\n const appendArrayOfItems = useCallback(\n async (items: PlayListQuizItem[], originId: number) => {\n let quizData: ImportPlaylistQuizItem[] = [];\n\n items.forEach((item) => {\n const { articleData, ...data } = item;\n\n if (data.type === 1) {\n if (articleData) {\n quizData.push({\n ...data,\n id: originId,\n image: data?.image ?? null,\n isMultiple: data.isMultiple ?? false,\n article: {\n videoData: articleData,\n },\n });\n }\n } else {\n quizData.push({\n ...data,\n id: originId,\n image: data?.image ?? null,\n isMultiple: data.isMultiple ?? false,\n article: null,\n });\n }\n });\n\n append(initFormValues(quizData));\n setRightList((prevState) => [...prevState, ...leftList.filter((item) => item.id === originId)].sort(sortFunction));\n setLeftList((prevState) => [...prevState.filter((item) => item.id !== originId)].sort(sortFunction));\n },\n [leftList, rightList]\n );\n\n const getQuizData = useCallback(\n async (id: number) => {\n const action = await getQuizDataByPlaylistId(id);\n let arr: PlayListQuizItem[] = [];\n\n action.items.forEach((item: PlayListQuizItem) => {\n if (item.type === 1) {\n importVideos && arr.push(item);\n } else {\n importTemplateQuestions && item.textOptions && arr.push(item);\n }\n });\n appendArrayOfItems(arr, id);\n },\n [importVideos, importTemplateQuestions, leftList, rightList]\n );\n\n const handleAddItemClick = useCallback(\n (id: number) => {\n getQuizData(id);\n },\n [importVideos, importTemplateQuestions, leftList, rightList]\n );\n\n const handleRemoveItemClick = useCallback(\n (id: number) => {\n const list = activityItems.reduce((result: number[], item, index) => {\n item.originId === id && result.push(index);\n return result;\n }, []);\n remove(list);\n setLeftList((prevState) => [...prevState, ...rightList.filter((item) => item.id === id)].sort(sortFunction));\n setRightList((prevState) => [...prevState.filter((item) => item.id !== id)].sort(sortFunction));\n },\n [leftList, rightList, activityItems]\n );\n\n const handleSearchKeywordChange = useCallback(\n (e: ChangeEvent) => {\n e.preventDefault();\n const searchValue = e.target.value.trim().toLowerCase();\n searchValue\n ? setLeftList((prevState) => [...prevState.filter((item) => item.title.toLowerCase().includes(searchValue))])\n : setLeftList([...defaultPlaylistsList]);\n },\n [leftList]\n );\n\n const handleImportVideosCheckboxChange = useCallback(() => {\n setImportVideos((prevState) => {\n if (prevState) {\n return !importTemplateQuestions;\n } else {\n return true;\n }\n });\n }, [importVideos, importTemplateQuestions]);\n\n const handleImportTemplateQuestionsCheckboxChange = useCallback(() => {\n setImportTemplateQuestions((prevState) => {\n if (prevState) {\n return !importVideos;\n } else {\n return true;\n }\n });\n }, [importVideos, importTemplateQuestions]);\n\n useEffect(() => {\n isOpen && getPlaylists(buildPlaylistParams(1, '')).then((res) => setTotalPlaylists(res.navigation.total_items));\n }, [isOpen, buildPlaylistParams]);\n\n useEffect(() => {\n totalPlaylists && getPlaylists(buildPlaylistParams(totalPlaylists, '')).then((res) => setPlaylistsList(res.result));\n }, [totalPlaylists, buildPlaylistParams]);\n\n useEffect(() => {\n setLeftList([...defaultPlaylistsList]);\n }, [playlistsList]);\n\n return (\n \n \n \n \n \n \n Select one or multiple playlists to add content.\n \n \n Please note that importing a playlist will take a few seconds.\n \n \n \n \n \n \n \n \n \n \n {({ width, height }) => (\n {\n const listItem = leftList[index];\n return (\n \n \n handleAddItemClick(listItem.id)}\n >\n {listItem.title}\n \n \n \n );\n }}\n />\n )}\n
\n \n \n \n \n {({ width, height }) => (\n {\n const listItem = rightList[index];\n return (\n \n \n handleRemoveItemClick(listItem.id)}\n >\n {listItem.title}\n \n \n \n );\n }}\n />\n )}\n
\n \n \n
\n \n \n \n Import Videos\n \n \n Import Template Questions\n \n \n \n \n \n \n );\n};\n\nexport default ImportPlaylist;\n","import React, {MouseEvent, useCallback, useState} from 'react';\nimport {Button, Flex, Tooltip, useDisclosure} from '@chakra-ui/react';\nimport {useFieldArray, useFormContext} from 'react-hook-form';\nimport {ActivityItem, Quiz, QuizFormData} from '@/features/Quiz/types';\nimport ImportPlaylist from '../ImportPlaylist';\nimport {AddVideoModal} from '@/features/Playlists/components/PlaylistForm/AddVideoModal';\nimport {getQuizTemplateByArticleId} from '@/features/Quiz/api/getQuizzes';\nimport Icon from \"@/components/Icon\";\n\ntype Props = {\n indexActivity: number;\n isLibrary?: boolean;\n};\n\nexport const RightQuizAddButton = ({indexActivity, isLibrary}: Props) => {\n const {\n isOpen: isImportPlaylistOpen,\n onOpen: onImportPlaylistOpen,\n onClose: onImportPlaylistClose\n } = useDisclosure();\n const [isOpen, setOpen] = useState(false);\n const [importQuestion, setImportQuestion] = useState(true);\n\n const {watch, control} = useFormContext();\n const {append, replace} = useFieldArray({\n control,\n name: `activities.${indexActivity}.items`,\n });\n const activityItems = watch(`activities.${indexActivity}.items`);\n\n const {isOpen: isAddVideoOpen, onOpen: onAddVideoOpen, onClose: onAddVideoClose} = useDisclosure();\n\n const handleAddVideo = useCallback(\n async (videoId: number | number[]) => {\n setOpen(false);\n const action = await getQuizTemplateByArticleId(Number(videoId));\n\n let data: ActivityItem[] = [];\n\n if (action) {\n action.activities &&\n action.activities.forEach((activity) => {\n activity.items?.sort((a, b) => a.sortIndex - b.sortIndex).forEach((item) => {\n const {id: customItemId, ...dataItem} = item;\n\n if (item.article == null && importQuestion) {\n data.push({\n ...dataItem,\n originId: null,\n rightAnswer: dataItem.rightAnswer ?? [1],\n textOptions: dataItem.textOptions?.map((textOption) => ({\n originId: textOption.id,\n text: textOption.text,\n })) ?? [\n {\n originId: 1,\n text: '',\n },\n {\n originId: 2,\n text: '',\n },\n {\n originId: 3,\n text: '',\n },\n {\n originId: 4,\n text: '',\n },\n ],\n isSelect: true,\n });\n } else if (item.article != null) {\n data.push({\n ...dataItem,\n originId: null,\n isSelect: true,\n rightAnswer: [],\n textOptions: [],\n });\n }\n });\n });\n }\n\n replace([\n ...activityItems.sort((a, b) => a.sortIndex - b.sortIndex),\n ...data,\n ].map((item, indexItem) => ({\n ...item,\n sortIndex: indexItem + 1,\n })));\n },\n [replace, activityItems, importQuestion],\n );\n\n const handleAddItemClick = useCallback(\n (e: MouseEvent) => {\n e.preventDefault();\n setOpen(false);\n\n append({\n article: null,\n originId: null,\n title: '',\n type: 2,\n image: '',\n isSelect: true,\n isMultiple: false,\n sortIndex: activityItems.length + 1,\n rightAnswer: [1],\n textOptions: [\n {\n originId: 1,\n text: '',\n },\n {\n originId: 2,\n text: '',\n },\n {\n originId: 3,\n text: '',\n },\n {\n originId: 4,\n text: '',\n },\n ],\n });\n },\n [append, activityItems]\n );\n\n const handleAddPlayListClick = useCallback((e: MouseEvent) => {\n e.preventDefault();\n onImportPlaylistOpen();\n }, []);\n\n const handleOpenAddItemClick = useCallback((e: MouseEvent) => {\n e.preventDefault();\n setOpen((state) => !state);\n }, []);\n\n const handleImportCheckbox = useCallback(() => {\n setImportQuestion((preState) => !preState);\n }, [importQuestion]);\n\n return (\n <>\n \n {isLibrary && (\n <>\n \n \n >\n )}\n \n {isLibrary && (\n <>\n \n \n >\n )}\n \n >\n );\n};\n","import React from 'react';\nimport Icon from '@/components/Icon';\n\ntype Props = {\n isIndeterminate?: boolean;\n isChecked?: boolean;\n};\n\nexport const QuizCheckboxIcon = ({ isIndeterminate, isChecked, ...rest }: Props) => {\n return (\n \n );\n}\n","import {\n FormControl,\n FormErrorMessage,\n Image, Box, Button, Flex,\n} from '@chakra-ui/react';\nimport React, { FC } from 'react';\nimport { useFileUpload } from 'use-file-upload';\nimport { saveQuizImage } from '@/features/Quiz/api/getQuizzes';\nimport Icon from '@/components/Icon';\n\ntype Props = {\n invalid: boolean;\n value?: string | null;\n isRequired?: boolean;\n onChangeImage: (url: string) => void;\n errImageFn: (err: string) => void;\n}\n\nconst FileUpload: FC = (\n {\n invalid = false,\n value,\n isRequired= false,\n onChangeImage,\n errImageFn,\n }\n) => {\n const [, selectFile] = useFileUpload();\n\n return (\n \n \n {value ?\n :\n \n }\n\n \n \n \n Error add image\n \n \n );\n}\n\nexport default FileUpload;","import React, { FC, useCallback, useEffect, useState } from 'react';\nimport {\n Modal,\n ModalOverlay,\n ModalContent,\n ModalHeader,\n ModalFooter,\n ModalBody,\n ModalCloseButton,\n Button,\n Select,\n} from '@chakra-ui/react';\nimport { Activity } from '../../types';\n\ntype Props = {\n sections: Activity[];\n isOpen: boolean;\n isLoading: boolean;\n onClose: () => void;\n onSubmit: (sectionId: number) => void;\n}\n\nexport const MoveComponentModal: FC = ({ sections, isOpen, isLoading, onClose, onSubmit }: Props) => {\n const [id, setId] = useState(null);\n\n const handleSubmit = useCallback(async (e: React.MouseEvent) => {\n e.preventDefault();\n\n if (id) {\n await onSubmit(id);\n }\n onClose();\n }, [onSubmit, onClose, id]);\n\n const handleSectionChange = useCallback((e: React.ChangeEvent) => {\n e.preventDefault();\n\n e.target.value && setId(Number(e.target.value));\n }, []);\n\n useEffect(() => {\n !isOpen && setId(null);\n }, [isOpen]);\n\n return (\n \n \n \n Move Component\n \n \n \n \n \n \n \n \n \n );\n};\n","import React, { Fragment, useEffect, useState } from 'react';\nimport {\n Box,\n Flex,\n Text,\n useMediaQuery,\n} from '@chakra-ui/react';\nimport flowplayer from '@flowplayer/player';\nimport SubtitlePlugin from '@flowplayer/player/plugins/subtitles';\nimport HLSPlugin from '@flowplayer/player/plugins/hls';\nimport OVPPlugin from '@flowplayer/player/plugins/ovp';\nimport SpeedPlugin from '@flowplayer/player/plugins/speed';\nimport ThumbnailsPlugin from '@flowplayer/player/plugins/thumbnails';\nimport DashPlugin from '@flowplayer/player/plugins/dash';\nimport DRMPlugin from '@flowplayer/player/plugins/drm';\nimport KeyboardPlugin from '@flowplayer/player/plugins/keyboard';\nimport CuepointsPlugin from '@flowplayer/player/plugins/cuepoints';\nimport GoogleAnalyticsPlugin from '@flowplayer/player/plugins/google-analytics';\nimport { PAUSE, PLAYING } from '@flowplayer/player/core/events';\nimport './flowplayer.css';\nimport { useFlowplayer } from '@flowplayer/react-flowplayer';\nimport { FaPlay } from 'react-icons/fa';\nimport { allLanguages, flowplayerToken } from '@/utils/consts';\nimport { ArticleByDomainEoE, ArticleCtx, ArticleByDomain } from \"@/types\";\nimport Icon from '../Icon';\n\ntype Props = {\n article: ArticleCtx | ArticleByDomain | ArticleByDomainEoE;\n ratio?: number;\n isOpenAccess?: boolean;\n iconSize?: string;\n autoPlay?: boolean;\n videoSrc?: string;\n thumbnail?: string;\n currentTime?: number;\n isQuizzes?: boolean;\n isExperiment?: boolean | null;\n isEoE?: boolean;\n videoSubtitles?: Record | null;\n};\n\nflowplayer(\n SpeedPlugin,\n SubtitlePlugin,\n ThumbnailsPlugin,\n HLSPlugin,\n OVPPlugin,\n DashPlugin,\n DRMPlugin,\n KeyboardPlugin,\n CuepointsPlugin,\n GoogleAnalyticsPlugin,\n);\n\nexport const VideoContainer = ({\n article,\n ratio,\n iconSize,\n autoPlay,\n videoSrc,\n thumbnail,\n currentTime,\n isQuizzes,\n isExperiment,\n isEoE,\n videoSubtitles,\n}: Props) => {\n if (article.domain.articleType == 'encyclopedia_of_experiments' && article.children[0] && isExperiment) {\n article = article.children[0].children[0];\n }\n const articleType = article?.domain?.articleType;\n\n const { api, Flowplayer } = useFlowplayer({ token: flowplayerToken });\n const [isSmThan750] = useMediaQuery(['(max-width: 750px)']);\n const [isThumbnailShowing, toggleThumbnail] = useState(true);\n\n const image = videoSrc || thumbnail || article?.domain?.images?.large || article?.domain?.images?.short || article?.domain?.headerImage;\n\n const [error, setError] = useState(null);\n const [isEducationPlayerPause, setIsEducationPlayerPause] = useState();\n const articleVideos = article.domain.videos['en'];\n\n const subtitles = videoSubtitles ?\n typeof videoSubtitles === 'string' ? [videoSubtitles] : Object.values(videoSubtitles) : [];\n\n const loadingSubtitle = (url: string) => {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.send('');\n xhr.onload = () => setError(xhr.status !== 200);\n xhr.onprogress = (event) => event.lengthComputable && setError(false);\n xhr.onerror = () => setError(true);\n };\n\n useEffect(() => {\n if (!api || currentTime === undefined) return;\n api.currentTime = currentTime;\n }, [currentTime]);\n\n useEffect(() => {\n if (api && autoPlay) {\n toggleThumbnail(false);\n api.play();\n }\n }, [api, autoPlay]);\n\n useEffect(() => {\n if (subtitles.length > 0) {\n loadingSubtitle(subtitles[0]);\n }\n const video = document.querySelector('video');\n if (video) video.setAttribute('crossorigin', 'anonymous');\n if (!api) return;\n if (error !== null) {\n if (error) {\n api.setOpts({\n subtitles: false,\n thumbnails: { src: Object.values(article.domain.videos).find((el) => el.thumbnails)?.thumbnails },\n });\n } else if (articleVideos.subtitles) {\n api.setOpts({\n subtitles: {\n tracks: typeof articleVideos.subtitles === 'string' ? [\n {\n src: articleVideos.subtitles,\n id: 0,\n label: allLanguages.find((lang) => lang.key === 'en')?.name || 'en',\n crossorigin: 'anonymous',\n },\n ] : Object.entries(articleVideos.subtitles).map(([key, val], index) => ({\n src: val,\n id: index,\n label: allLanguages.find((lang) => lang.key === key)?.name || key,\n crossorigin: 'anonymous',\n })),\n },\n thumbnails: { src: Object.values(article.domain.videos).find((el) => el.thumbnails)?.thumbnails },\n });\n } else {\n api.setOpts({\n subtitles: false,\n thumbnails: { src: Object.values(article.domain.videos).find((el) => el.thumbnails)?.thumbnails },\n });\n }\n }\n }, [api, article, error]);\n\n useEffect(() => {\n if (!image && isThumbnailShowing) toggleThumbnail(false);\n }, [image]);\n\n const iconPlay: HTMLElement | null = document.querySelector('.fp-middle');\n const fpPlay: HTMLElement | null = document.querySelector('.fp-play');\n\n const thumbnailClicked = async () => {\n toggleThumbnail(false);\n iconPlay?.style.setProperty('opacity', '1');\n fpPlay?.style.setProperty('opacity', '1');\n\n if (api) {\n api.play();\n }\n };\n\n const togglePlay = () => api && api.togglePlay();\n\n useEffect(() => {\n if (!api) return;\n const education = ['jove_core', 'science_education'];\n\n const stateHandler = (ev: Event) => {\n if (education.includes(articleType) || isQuizzes) {\n if (ev.type === PAUSE) {\n setIsEducationPlayerPause(true);\n fpPlay?.style.setProperty('opacity', '0');\n }\n\n if (ev.type === PLAYING) {\n setIsEducationPlayerPause(false);\n }\n } else {\n setIsEducationPlayerPause(undefined);\n }\n };\n\n api.on([PAUSE, PLAYING], stateHandler);\n\n return () => {\n if (!api) return;\n api.off(PAUSE, stateHandler);\n api.off(PLAYING, stateHandler);\n };\n }, [api]);\n\n const { colorOfHeaderText } = getHeaderTextAndColor(articleType);\n const color = colorOfHeaderText === 'primary.blue' ? '#4193F4' : colorOfHeaderText || '#fff';\n\n useEffect(() => {\n if (colorOfHeaderText) {\n document.documentElement.style.setProperty('--fp-brand-color', color);\n }\n }, [colorOfHeaderText]);\n\n const videoObjVideo = article?.domain?.videos && article.domain.videos['en'];\n\n\n const src = videoObjVideo?.cdnFile || videoObjVideo?.fpResourceId;\n const metaWidth = article?.domain?.videos['en']?.metaWidth;\n const metaHeight = article?.domain?.videos['en']?.metaHeight;\n\n useEffect(() => {\n if (isEoE && api) {\n api.pause();\n }\n }, [isEoE]);\n\n return (\n \n \n {isEducationPlayerPause &&\n }\n\n {isEducationPlayerPause && (\n \n \n \n \n \n \n )}\n \n {isThumbnailShowing && (\n \n \n \n \n \n \n \n \n \n )}\n \n \n \n \n );\n};\n\nfunction getHeaderTextAndColor(type: string) {\n let headerText = '';\n let colorOfHeaderText = 'primary.blue';\n if (type === 'journal') {\n headerText = 'JoVE Journal';\n }\n if (type === 'jove_core') {\n headerText = 'JoVE Core';\n colorOfHeaderText = '#44D7B6';\n }\n if (type === 'encyclopedia_of_experiments') {\n headerText = 'JoVE Encyclopedia Of Experiments';\n }\n if (type === 'science_education') {\n headerText = 'JoVE Science Education';\n colorOfHeaderText = '#44D7B6';\n }\n if (type === 'lab_manual' || type === 'lab_manual_prep' || type === 'lab_manual_procedure') {\n headerText = 'JoVE Lab Manual';\n colorOfHeaderText = '#44D7B6';\n }\n return { headerText, colorOfHeaderText };\n}\n","import React, { FC } from 'react';\nimport {\n Modal,\n ModalOverlay,\n ModalContent,\n ModalHeader,\n ModalBody,\n ModalCloseButton,\n} from '@chakra-ui/react';\nimport { useQuery } from 'react-query';\nimport { fetchArticleByDomainId } from '@/utils/api';\nimport {ErrorBlock} from \"@/components/ErrorBlock\";\nimport {VideoContainer} from \"@/components/video-container/video-container\";\n\ntype Props = {\n videoId: number | null;\n isOpen: boolean;\n onClose: () => void;\n subtitles?: Record | null;\n}\n\nexport const VideoModal: FC = ({ videoId, isOpen = false, onClose, subtitles }: Props) => {\n const { isLoading, data, isError } = useQuery(\n `fetchVideo-${videoId}`,\n () => fetchArticleByDomainId('en', Number(videoId)),\n {\n enabled: isOpen && videoId !== null,\n }\n );\n\n return (\n \n \n \n \n \n \n {!isError && !isLoading && data && (\n \n )}\n {isError && }\n \n \n \n );\n};\n","import React, {useEffect, useState} from 'react';\nimport { useDisclosure, Image, Box } from '@chakra-ui/react';\nimport { FaPlay } from 'react-icons/fa';\nimport { VideoModal } from '../VideoModal';\n\ntype Props = {\n videoData?: {\n articleId: number;\n images: {\n large: string;\n short?: string;\n };\n subtitles?: Record;\n title: string;\n videoHash: string | null;\n videoUrl: string | null;\n } | null;\n showCaption?: boolean;\n};\nexport const ViewQuizVideoContainer = ({ videoData, showCaption }: Props) => {\n const { isOpen, onOpen, onClose } = useDisclosure();\n const [image, setImage] = useState();\n\n useEffect(() => {\n setImage(videoData?.images?.short || videoData?.images?.large || '/assets/VideoComingSoonTeaser.webp');\n }, [videoData]);\n\n const handleError = () => setImage('/assets/VideoComingSoonTeaser.webp');\n\n return (\n <>\n \n {(videoData?.images?.large || videoData?.images?.short) && (\n \n \n \n )}\n \n >\n );\n};\n","import { parseText } from '@/utils/helpers';\nimport React, { MouseEvent, ChangeEvent, FC, useCallback, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { useFieldArray, useFormContext, Controller } from 'react-hook-form';\nimport { Quiz, QuizFormData } from '../../types';\nimport {\n Box,\n Button,\n Checkbox,\n CheckboxGroup,\n Collapse,\n Flex,\n FormControl,\n FormErrorMessage,\n FormLabel,\n Heading,\n Input,\n Textarea,\n} from '@chakra-ui/react';\nimport { QuizCheckboxIcon } from '../QuizCheckboxIcon';\nimport FileUpload from '@/components/Form/FileUpload';\nimport { MoveComponentModal } from '../MoveComponentModal';\nimport { ViewQuizVideoContainer } from '../ViewQuizVideoContainer';\nimport TextEditor from '@/components/TextEditor/TextEditor';\nimport Icon from '@/components/Icon';\n\ntype Props = {\n indexActivity: number;\n indexItem: number;\n templateQuiz?: Quiz | null;\n};\n\nexport const RightQuizItem: FC = ({ indexActivity, indexItem, children }) => {\n const [isOpen, setOpen] = useState(false);\n const [isLoading, setLoading] = useState(false);\n const { pathname } = useLocation();\n\n const isQuizTemplate = !pathname.match(/library|admin-quiz/gi);\n\n const {\n watch,\n formState: { errors },\n register,\n control,\n setValue,\n setError,\n } = useFormContext();\n\n const { replace: replaceItem } = useFieldArray({\n control,\n name: `activities.${indexActivity}.items`,\n });\n const { remove, append } = useFieldArray({\n control,\n name: `activities.${indexActivity}.items.${indexItem}.textOptions`,\n });\n\n const activities = watch(`activities`);\n const showCaption = watch(`showCaption`);\n const activityItems = watch(`activities.${indexActivity}.items`);\n const activityItem = watch(`activities.${indexActivity}.items.${indexItem}`);\n const errorActivityItems = errors.activities && errors.activities[indexActivity] && errors.activities?.[indexActivity]?.items;\n\n const handleMoveOpen = useCallback((e: MouseEvent) => {\n e.preventDefault();\n\n setOpen(true);\n }, []);\n\n const handleMoveClose = useCallback(() => {\n setOpen(false);\n }, []);\n\n const handleMoveSubmit = useCallback(\n async (activeIndex: number) => {\n setLoading(true);\n\n const listItems = activityItems\n .filter((_, key) => key !== indexItem)\n .map((item, key) => {\n return { ...item, sortIndex: key + 1 };\n });\n\n const newActivities = activities.map((data, key) => {\n if (key === indexActivity) {\n return {\n ...data,\n items: listItems,\n };\n }\n\n if (data.sortIndex === activeIndex) {\n const moveItems = [...data.items, { ...activityItem, originId: null, id: null }].map((item, key) => {\n return { ...item, sortIndex: key + 1 };\n });\n\n return {\n ...data,\n items: moveItems,\n };\n }\n\n return data;\n });\n\n await setValue('activities', newActivities);\n\n setLoading(false);\n },\n [activityItems, indexItem, setValue, activities, activityItem]\n );\n\n const handleRemoveTextOption = useCallback(\n (id: number, index: number) => (e: MouseEvent) => {\n e.preventDefault();\n\n if (activityItem.textOptions.length > 1) {\n if (activityItem.rightAnswer.includes(id)) {\n if (activityItem.rightAnswer.length > 1) {\n setValue(\n `activities.${indexActivity}.items.${indexItem}.rightAnswer`,\n activityItem.rightAnswer.filter((customId) => customId !== id)\n );\n }\n\n if (activityItem.rightAnswer.length === 1) {\n setValue(`activities.${indexActivity}.items.${indexItem}.rightAnswer`, [\n activityItem.textOptions.filter((item) => item.originId !== id)[0].originId,\n ]);\n }\n }\n\n remove(index);\n }\n },\n [remove, activityItem.textOptions.length, activityItem.rightAnswer, setValue, indexActivity, indexItem]\n );\n\n const handleAddTextOptionClick = useCallback(\n (originId: number) => (e: ChangeEvent) => {\n e.preventDefault();\n\n if (activityItem.isMultiple) {\n if (activityItem.rightAnswer.includes(originId)) {\n activityItem.rightAnswer.length > 1 &&\n setValue(\n `activities.${indexActivity}.items.${indexItem}.rightAnswer`,\n activityItem.rightAnswer.filter((id) => id !== originId)\n );\n } else {\n setValue(`activities.${indexActivity}.items.${indexItem}.rightAnswer`, [...activityItem.rightAnswer, originId]);\n }\n } else {\n !activityItem.rightAnswer.includes(originId) && setValue(`activities.${indexActivity}.items.${indexItem}.rightAnswer`, [originId]);\n }\n },\n [setValue, indexActivity, indexItem, activityItem.rightAnswer, activityItem.isMultiple]\n );\n\n const handleMultipleAnswersClick = useCallback(\n (e: ChangeEvent) => {\n e.preventDefault();\n\n if (!e.target.checked && activityItem.rightAnswer.length > 1) {\n setValue(`activities.${indexActivity}.items.${indexItem}.rightAnswer`, [activityItem.textOptions[0].originId]);\n }\n },\n [setValue, indexActivity, indexItem, activityItem.rightAnswer, activityItem.textOptions]\n );\n\n const handleToggle = useCallback(\n (e: MouseEvent) => {\n e.preventDefault();\n\n setValue(`activities.${indexActivity}.items.${indexItem}.isSelect`, !activityItem.isSelect);\n },\n [setValue, indexActivity, indexItem, activityItem.isSelect]\n );\n\n const handleAddQuestionClick = useCallback(\n (e: MouseEvent) => {\n e.preventDefault();\n\n append({\n originId: activityItem.textOptions.length + 1,\n text: '',\n });\n },\n [append, activityItem.textOptions.length]\n );\n\n const handleRemoveItemClick = useCallback(\n (e: MouseEvent) => {\n e.preventDefault();\n\n const list = activityItems\n .filter((_, key) => key !== indexItem)\n .map((item, key) => {\n if (key === 0) {\n return {\n ...item,\n sortIndex: key + 1,\n };\n }\n return { ...item, sortIndex: key + 1 };\n });\n\n replaceItem(list);\n },\n [replaceItem, indexItem, activityItems]\n );\n\n const handleChangeImage = useCallback(\n (url: string) => {\n setValue(`activities.${indexActivity}.items.${indexItem}.image`, url);\n },\n [setValue, indexActivity, indexItem]\n );\n\n const handleErrorImage = useCallback(\n (err: string) => {\n setError(`activities.${indexActivity}.items.${indexItem}.image`, { type: 'server', message: err });\n },\n [setError, indexActivity, indexItem]\n );\n\n return (\n \n \n \n \n {children}\n\n \n \n {activityItem.type === 2 ? `Question ${activityItem?.questionOrder || ''}` : 'Video'}\n \n {activityItem.type === 1 && (\n \n )}\n \n\n {activities.length > 1 && (\n <>\n \n key !== indexActivity)}\n isOpen={isOpen}\n isLoading={isLoading}\n onClose={handleMoveClose}\n onSubmit={handleMoveSubmit}\n />\n >\n )}\n \n\n \n {activityItem.type === 1 && (\n \n )}\n\n \n \n \n \n \n\n {!activityItem.isSelect && activityItem.type === 2 && (\n \n {parseText(activityItem.title)}\n \n )}\n\n {activityItem.type === 1 && }\n\n \n {activityItem.type === 1 ? (\n <>\n {activityItem.article?.videoData ||\n activityItem.article?.videoData.videoUrl ||\n activityItem.article?.videoData.videoHash ? (\n \n \n \n ) : null}\n >\n ) : (\n <>\n \n \n {isQuizTemplate ? (\n (\n \n )}\n />\n ) : (\n \n )}\n {errorActivityItems && errorActivityItems?.[indexItem]?.title?.message}\n \n \n Be sure to make your question clear and understandable\n \n \n\n \n Upload Image\n \n\n \n \n \n\n \n \n }\n _hover={{}}\n _focus={{ outline: 0 }}\n _active={{}}\n />\n \n Add multiple answers\n \n \n \n\n \n \n {activityItem.textOptions.map((textOption, index) => {\n const errorsTextOption = errorActivityItems && errorActivityItems?.[indexItem]?.textOptions;\n\n return (\n \n \n }\n value={textOption.originId}\n onChange={handleAddTextOptionClick(textOption.originId)}\n _hover={{}}\n _focus={{ outline: 0 }}\n _active={{}}\n />\n \n\n \n {isQuizTemplate ? (\n (\n \n )}\n />\n ) : (\n \n )}\n \n {errorsTextOption && errorsTextOption?.[index]?.text?.message}\n \n \n\n {activityItem.textOptions.length > 1 && (\n \n )}\n \n );\n })}\n \n \n \n \n \n \n >\n )}\n \n \n \n );\n};\n","import { modelShaper } from '@/utils/helpers';\nimport React from 'react';\nimport { RightQuizAddButton } from '../RightQuizAddButton';\nimport { useFormContext } from 'react-hook-form';\nimport { QuizFormData } from '../../types';\nimport { RightQuizItem } from '../RightQuizItem';\nimport { Box } from '@chakra-ui/react';\nimport { Draggable, Droppable } from 'react-beautiful-dnd';\nimport Icon from '@/components/Icon';\n\ntype Props = {\n indexActivity: number;\n isLibrary?: boolean;\n};\n\nexport const RightQuizItems = ({ indexActivity, isLibrary }: Props) => {\n const { getValues } = useFormContext();\n\n const items = getValues(`activities.${indexActivity}.items`);\n\n const updatedItems = [...items];\n modelShaper(updatedItems);\n\n return (\n <>\n \n {(provided) => (\n \n {updatedItems?.map((_, index) => (\n
\n {(provided) => (\n \n \n \n \n \n \n
\n )}\n \n ))}\n {provided.placeholder}\n
\n )}\n \n\n \n >\n );\n};\n","import React, { Fragment, useCallback, useEffect, useState } from 'react';\nimport { Navigate, useParams, useLocation } from 'react-router-dom';\nimport {\n Box,\n Checkbox,\n CheckboxGroup,\n Flex,\n Image,\n ModalCloseButton,\n Modal,\n ModalBody,\n ModalContent,\n Stack, ModalHeader, Button, ModalFooter,\n} from '@chakra-ui/react';\nimport { ViewQuizVideoContainer } from '../ViewQuizVideoContainer';\nimport { QuizCheckboxIcon } from '../QuizCheckboxIcon';\nimport { useAuth } from \"@/context/AuthContext\";\nimport parse from 'html-react-parser';\nimport { QuizFormData } from '@/features/Quiz';\nimport Icon from '@/components/Icon';\n\ntype Props = {\n onClose: () => void;\n isOpen: boolean;\n data?: QuizFormData;\n}\n\nexport const PreviewQuizModal = ({ onClose, isOpen, data }: Props) => {\n const { user } = useAuth();\n const isSuperAdmin = user?.roles.includes('ROLE_SUPER_ADMIN');\n\n const { pathname } = useLocation();\n const { quizLibraryId, adminQuizId, userQuizId } = useParams();\n\n const [tabActivity, setTabActivity] = useState(null);\n const [textOptions, setTextOptions] = useState<{\n activityId: number;\n items: {\n itemId: number;\n value: string[];\n }[]\n }[]>(\n data?.activities?.sort((a, b) => a.sortIndex - b.sortIndex).map((activitItem, index) => {\n return {\n activityId: activitItem.originId || index || 0,\n items: activitItem.items?.filter((item) => item.type === 2).map((item, index) => {\n return {\n itemId: item.originId || index || 0,\n value: [],\n };\n }) ?? [],\n };\n }) ?? []);\n\n const timeLimit = useCallback(() => {\n if (data && data.duration) {\n const hours = Math.floor(data.duration / 60);\n const minutes = data.duration % 60;\n return `${hours ? `${hours}:` : ''}${minutes ? `${Math.floor(minutes)}` : '00'}:00`;\n }\n }, []);\n\n const handleTextOptionsChange = useCallback(\n (activityId: number, activityItemId: number, isMultiple: boolean = false) =>\n (value: string[]) => {\n\n setTextOptions((state) => {\n const activitiesSelect = state.find((item) => item.activityId === activityId);\n const otherActivities = state.filter((item) => item.activityId !== activityId);\n\n if (activitiesSelect) {\n return ([\n ...otherActivities,\n {\n activityId: activitiesSelect.activityId,\n items: activitiesSelect.items.map((item) => {\n if (item.itemId === activityItemId) {\n return {\n itemId: item.itemId,\n value: isMultiple ?\n value :\n value.filter((dataValue) => !item.value.includes(dataValue)),\n };\n }\n return item;\n }),\n },\n ]);\n }\n\n return otherActivities;\n });\n }, []);\n\n useEffect(() => {\n if (data) {\n setTextOptions(data.activities?.sort((a, b) => a.sortIndex - b.sortIndex).map((activitItem) => {\n return {\n activityId: activitItem.originId ?? 0,\n items: activitItem.items?.filter((item) => item.type === 2).map((item) => {\n return {\n itemId: item.originId ?? 0,\n value: [],\n };\n }) ?? [],\n };\n }) ?? []);\n\n data.activities && setTabActivity(data.activities[0].originId);\n }\n }, [data]);\n\n if (!isSuperAdmin && !quizLibraryId && !adminQuizId && !userQuizId) {\n return \n }\n\n return (\n \n \n \n Quiz Preview\n \n {data &&\n \n \n <>\n \n\n {data.duration && (\n <>\n \n Time Limit\n \n {timeLimit()}\n >\n )}\n\n {data.endDate && (\n <>\n \n Deadline\n \n {new Date(data.endDate).toLocaleString()}\n >\n )}\n\n \n \n Activities\n \n \n\n {data.activities?.map((activity, i) => (\n setTabActivity(activity.originId)}\n key={i}\n >\n \n \n {activity.title ?? ''}\n \n \n ))}\n >\n \n\n \n \n \n\n \n \n Activity 1\n of {(data?.activities && data.activities.length > 0) ? data.activities.length : '1'}\n \n \n {data.activities?.find((item) => item.originId === tabActivity)?.title ?? ''}\n \n \n\n \n {data.activities?.filter((item) => item.originId === tabActivity).map((activity, i) => (\n \n {activity.items?.sort(\n (a, b) => a.sortIndex - b.sortIndex,\n ).map((activityItem, i) => (\n \n \n \n {activityItem?.type === 1 ? (\n \n \n \n \n \n \n ) : (\n \n \n Question\n \n \n\n {activityItem.image && (\n \n \n \n )}\n\n data.activityId === activity?.originId)?.items\n .find((data) => data.itemId === activityItem.originId)?.value ?? []\n }\n >\n \n {activityItem.textOptions && activityItem.textOptions.map(\n (textOption, i) => {\n const textOptionsSelected = textOptions\n .find((data, i) => data.activityId === activity?.originId || i === activity?.sortIndex)?.items\n .find((data, i) => data.itemId === activityItem.originId || i === activityItem?.sortIndex)?.value ?? [];\n return (\n \n }\n fontSize={'18px'}\n className={\n !data.isGraded && textOptionsSelected.includes(`${textOption.originId}`) ?\n (activityItem.rightAnswer ?? []).includes(textOption.originId) ?\n 'textOptionsGood' : 'textOptionsFail' :\n pathname.includes('create') ? (activityItem.rightAnswer?.toString() ?? []).includes(`${textOption.originId}`) ?\n 'textOptionsGood' : 'textOptionsFail' : ''\n }\n >\n {parse(textOption.text)}\n \n \n );\n })}\n \n \n \n )}\n \n \n \n ))}\n \n ))}\n \n \n \n \n \n }\n \n \n \n \n \n \n );\n};\n","import { useAuth } from '@/context/AuthContext';\nimport React, { MouseEvent, useCallback } from 'react';\nimport {\n Button,\n FormLabel,\n Input,\n FormErrorMessage,\n FormControl,\n Flex, useDisclosure,\n} from '@chakra-ui/react';\nimport { useFieldArray, useFormContext } from 'react-hook-form';\nimport { QuizFormData } from '@/features/Quiz/types';\nimport { RightQuizItems } from '../RightQuizItems';\nimport { PreviewQuizModal } from '@/features/Quiz/components/PreviewQuizModal';\nimport Icon from '@/components/Icon';\n\ntype Props = {\n isLibrary?: boolean;\n}\n\nexport const RightQuiz = ({ isLibrary = false }: Props) => {\n const { register, formState: { errors }, watch, control, getValues } = useFormContext();\n const { isOpen, onOpen, onClose } = useDisclosure();\n const values = getValues();\n const { user } = useAuth();\n const isSuperAdmin = user?.roles.includes('ROLE_SUPER_ADMIN');\n\n const indexActivity = (watch('activities')?.find((item) => item.isSelect)?.sortIndex ?? 1) - 1\n\n const { replace } = useFieldArray({\n control,\n name: `activities.${indexActivity}.items`\n });\n\n const items = watch(`activities.${indexActivity}.items`);\n\n const handleCollapseAllClick = useCallback((e: MouseEvent) => {\n e.preventDefault();\n\n const itemsList = items.map((item) => ({ ...item, isSelect: false }));\n\n replace(itemsList);\n }, [replace, items]);\n\n const handleExpandAllClick = useCallback((e: MouseEvent) => {\n e.preventDefault();\n\n const itemsList = items.map((item) => ({ ...item, isSelect: true }));\n\n replace(itemsList);\n }, [replace, items]);\n\n return (\n <>\n {isSuperAdmin && }\n \n \n \n \n \n \n\n {isLibrary &&\n \n \n \n Activity Title *\n \n \n \n {errors.activities && errors.activities?.[indexActivity]?.title?.message}\n \n \n \n }\n\n \n \n \n\n {isSuperAdmin && values?.activities?.length && values.activities.map(i => i?.items)?.length && values.activities.map(i => i?.items)[0]?.length ?\n \n : null}\n\n \n \n >\n );\n}\n","import React, { useEffect, useCallback, memo } from 'react';\nimport { Flex } from '@chakra-ui/react';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport * as yup from 'yup';\nimport { FormProvider, useFieldArray, useForm } from 'react-hook-form';\nimport { LeftCreateQuiz } from '../LeftCreateQuiz';\nimport { RightQuiz } from '../RightQuiz';\nimport { Quiz, QuizFormData } from '../../types';\nimport { DragDropContext, DropResult } from 'react-beautiful-dnd';\nimport { Reorder } from '@/utils/helpers';\nimport { createNewQuiz, editQuiz, QuizType } from '@/redux/reducers/quizzes/quizSlice';\nimport { useDispatch } from 'react-redux';\nimport { AppDispatch } from '@/redux/store';\nimport { isFulfilled, isRejected } from '@reduxjs/toolkit';\nimport { useNavigate, useLocation } from 'react-router-dom';\nimport { useNotificationStore } from '@/stores/notifications';\nimport { createNewQuizLibrary, editQuizLibrary } from '@/redux/reducers/quizzes/quizLibrary';\nimport { createQuizAdmin, editQuizAdmin } from '@/redux/reducers/quizzes/quizAdmin';\nimport { createQuizUser, editQuizUser } from '@/redux/reducers/quizzes/quizUser';\n\nconst searchInputSchema = (isLibrary: boolean) => {\n if (isLibrary) {\n return yup.object().shape({\n title: yup.string(),\n });\n }\n\n return yup.object().shape({\n title: yup.string(),\n isGraded: yup.string(),\n });\n};\n\ntype Props = {\n quiz?: QuizType | null;\n isLibrary?: boolean;\n isAdminQuiz?: boolean;\n isEdit?: boolean;\n isUserQuiz?: boolean;\n};\n\nexport const FormQuiz = memo(({ quiz, isLibrary = false, isAdminQuiz = false, isEdit = false, isUserQuiz = false }: Props) => {\n const navigate = useNavigate();\n const dispatch = useDispatch();\n const { pathname } = useLocation();\n const isCustomerQuiz = pathname.includes(\"customer-quiz\");\n\n const { addNotification } = useNotificationStore();\n const [isSubmitting, setIsSubmitting] = React.useState(false);\n const initFormValues = useCallback(\n (data: (Omit & { isGraded?: boolean }) | null) => {\n return {\n article: data?.article || null,\n title: data?.title ?? '',\n tags: data?.tags?.map((tag) => tag.id) ?? [],\n ...(isAdminQuiz || isLibrary || isUserQuiz\n ? {\n isGraded: typeof data?.isGraded === 'boolean' ? (data?.isGraded ? 'graded' : 'ungraded') : '',\n startDate: data?.startDate ? new Date(data.startDate) : new Date(),\n endDate: data?.endDate ? new Date(data.endDate) : null,\n duration: data?.duration ?? 0,\n showCaption: data ? data.showCaption : true,\n }\n : {}),\n ...(isUserQuiz\n ? {\n restrictNonInstitutional: data?.restrictNonInstitutional ?? false,\n }\n : {}),\n activities:\n data?.activities && data.activities.length > 0\n ? [...data.activities]\n .sort((a, b) => a.sortIndex - b.sortIndex)\n .map((activity, index) => {\n const { id: customId, items, ...dataActivity } = activity;\n\n return {\n ...dataActivity,\n originId: customId,\n isSelect: index === 0,\n sortIndex: index + 1,\n items:\n items && items.length > 0\n ? [...items]\n .sort((a, b) => a.sortIndex - b.sortIndex)\n .map((item, indexItem) => {\n const { id: customItemId, ...dataItem } = item;\n\n return {\n ...dataItem,\n originId: customItemId,\n isSelect: true,\n sortIndex: indexItem + 1,\n isMultiple: dataItem.isMultiple ?? false,\n rightAnswer: dataItem.rightAnswer ?? [1],\n textOptions: dataItem.textOptions\n ? dataItem.textOptions.map((textOption) => {\n const { id: customTextOptionId, ...dataTextOption } = textOption;\n return {\n ...dataTextOption,\n originId: customTextOptionId,\n };\n })\n : [\n {\n originId: 1,\n text: '',\n },\n {\n originId: 2,\n text: '',\n },\n {\n originId: 3,\n text: '',\n },\n {\n originId: 4,\n text: '',\n },\n ],\n };\n })\n : [],\n };\n })\n : [\n {\n originId: null,\n title: 'Activity 1',\n sortIndex: 1,\n isSelect: true,\n items: [],\n },\n ],\n };\n },\n []\n );\n\n const { handleSubmit, ...methods } = useForm({\n mode: \"onSubmit\",\n resolver: yupResolver(\n searchInputSchema(isLibrary || isAdminQuiz || isUserQuiz)\n ),\n defaultValues: initFormValues(quiz ?? null),\n });\n\n const { replace } = useFieldArray({\n control: methods.control,\n name: \"activities\",\n });\n\n const activities = methods.watch(\"activities\");\n const indexActivity =\n (activities?.find((item) => item.isSelect)?.sortIndex ?? 1) - 1;\n const items = activities[indexActivity].items;\n\n const { replace: replaceItems } = useFieldArray<\n QuizFormData,\n `activities.${number}.items`\n >({\n control: methods.control,\n name: `activities.${indexActivity}.items`,\n });\n\n useEffect(() => {\n quiz?.title && methods.setValue('title', quiz.title);\n quiz?.activities &&\n methods.setValue(\n 'activities',\n quiz?.activities && quiz.activities.length > 0\n ? [...quiz.activities]\n .sort((a, b) => a.sortIndex - b.sortIndex)\n .map((activity, index) => {\n const { id: customId, items, ...dataActivity } = activity;\n\n return {\n ...dataActivity,\n originId: customId,\n isSelect: index === 0,\n sortIndex: index + 1,\n items:\n items && items.length > 0\n ? [...items]\n .sort((a, b) => a.sortIndex - b.sortIndex)\n .map((item, indexItem) => {\n const { id: customItemId, ...dataItem } = item;\n\n return {\n ...dataItem,\n originId: customItemId,\n isSelect: true,\n sortIndex: indexItem + 1,\n isMultiple: dataItem.isMultiple ?? false,\n rightAnswer: dataItem.rightAnswer ?? [1],\n textOptions: dataItem.textOptions\n ? dataItem.textOptions.map((textOption) => {\n const { id: customTextOptionId, ...dataTextOption } = textOption;\n return {\n ...dataTextOption,\n originId: customTextOptionId,\n };\n })\n : [\n {\n originId: 1,\n text: '',\n },\n {\n originId: 2,\n text: '',\n },\n {\n originId: 3,\n text: '',\n },\n {\n originId: 4,\n text: '',\n },\n ],\n };\n })\n : [],\n };\n })\n : []\n );\n }, [quiz?.title, quiz?.activities]);\n\n const onDragEnd = useCallback(\n (result: DropResult) => {\n if (!result.destination) {\n return;\n }\n\n if (result.type === \"ACTIVITIES\") {\n const list = Reorder(\n activities,\n result.source.index,\n result.destination.index\n );\n\n replace(list);\n } else {\n const list = Reorder(\n items,\n result.source.index,\n result.destination.index\n );\n\n replaceItems(list);\n }\n },\n [replace, replaceItems, activities, items]\n );\n\n const onSubmit = useCallback(async () => {\n const { isGraded, activities, startDate, endDate, duration, showCaption, restrictNonInstitutional, ...rest } = methods.getValues();\n const { title } = methods.getValues();\n\n let alertMessage = '';\n\n if (isEdit) {\n for (const activity of activities) {\n for (const item of activity.items) {\n const arr: string[] = [];\n\n if (item.article === null) {\n for (const options of item.textOptions) {\n arr.push(options.text);\n const hasDuplicates = () => new Set(arr).size !== arr.length;\n if (alertMessage) break;\n\n if (!options.text) {\n alertMessage = alertMessage + 'Options should not be empty';\n break;\n } else if (hasDuplicates()) {\n alertMessage = alertMessage + 'Options should not be duplicated';\n break;\n }\n }\n }\n }\n }\n }\n\n if (title.trim().length === 0) {\n alertMessage = alertMessage + 'No Title\\n';\n } else if (title.trim().length < 3) {\n alertMessage = alertMessage + 'Title is too short. It should have 3 characters or more\\n';\n }\n\n if ((isLibrary || isAdminQuiz || isUserQuiz) && isGraded.length === 0) {\n alertMessage = alertMessage + 'No type selected\\n';\n }\n\n if (!isEdit) {\n for (const activity of activities) {\n if (activity.items.length === 0) {\n alertMessage =\n alertMessage + (isLibrary ? 'Each activity should have at least one question\\n' : 'There should be at least one question\\n');\n break;\n } else {\n for (const item of activity.items) {\n if (item.title.trim().length === 0) {\n alertMessage = alertMessage + 'Question title should not be empty\\n';\n break;\n } else if (item.title.trim().length < 3) {\n alertMessage = alertMessage + 'Question title is too short. It should have 3 characters or more\\n';\n break;\n }\n }\n }\n }\n }\n\n if (alertMessage.length > 0) {\n addNotification({\n type: 'error',\n title: alertMessage,\n });\n\n return;\n }\n\n setIsSubmitting(true);\n\n if (isLibrary) {\n if (quiz && isEdit) {\n const action = await dispatch(\n editQuizLibrary({\n id: quiz.id,\n data: {\n ...rest,\n startDate: startDate?.toISOString() ?? '',\n endDate: endDate?.toISOString() ?? null,\n isGraded: isGraded === 'graded',\n duration: duration === 0 ? null : duration,\n activities:\n activities?.map((activity) => {\n const { title, sortIndex, items, originId } = activity;\n\n return {\n id: originId,\n title,\n sortIndex,\n items: items?.map((item) => {\n const {\n article,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions,\n type,\n isMultiple,\n rightAnswer,\n image,\n originId: originIdItem,\n } = item;\n\n if (type === 1) {\n return {\n id: originIdItem,\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n type,\n isMultiple,\n image,\n };\n }\n\n return {\n id: originIdItem,\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions: textOptions.map((textOption) => ({\n id: textOption.originId,\n text: textOption.text,\n })),\n type,\n isMultiple,\n rightAnswer,\n image,\n };\n }),\n };\n }) ?? [],\n },\n })\n );\n\n if (isFulfilled(action)) {\n setIsSubmitting(false);\n navigate(`/quiz/library`, {\n replace: true,\n });\n }\n\n if (isRejected(action) && action.payload) {\n setIsSubmitting(false);\n if (action.payload.content.errors) {\n Object.values(action.payload.content.errors).forEach(\n (errorItem) =>\n errorItem?.forEach((error) => {\n addNotification({\n type: 'error',\n title: error.message,\n });\n })\n );\n }\n }\n } else {\n const action = await dispatch(\n createNewQuizLibrary({\n ...rest,\n startDate: startDate?.toISOString() ?? '',\n endDate: endDate?.toISOString() ?? '',\n isGraded: isGraded === 'graded',\n duration: duration === 0 ? null : duration,\n activities: activities.map((activity) => {\n const { title, sortIndex, items } = activity;\n\n return {\n title,\n sortIndex,\n items: items.map((item) => {\n const {\n article,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions,\n type,\n isMultiple,\n rightAnswer,\n image,\n } = item;\n\n if (type === 1) {\n return {\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions: [],\n type,\n isMultiple,\n rightAnswer: [],\n image,\n };\n }\n\n return {\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions: textOptions.map((textOption) => ({\n id: textOption.originId,\n text: textOption.text,\n })),\n type,\n isMultiple,\n rightAnswer,\n image,\n };\n }),\n };\n }),\n })\n );\n\n if (isFulfilled(action) && action.payload) {\n setIsSubmitting(false);\n navigate(`/quiz/library`, {\n replace: true,\n });\n }\n if (isRejected(action) && action.payload) {\n setIsSubmitting(false);\n if (action.payload.content.errors) {\n Object.values(action.payload.content.errors).forEach(\n (errorItem) =>\n errorItem?.forEach((error) => {\n addNotification({\n type: 'error',\n title: error.message,\n });\n })\n );\n }\n }\n }\n } else if (isAdminQuiz) {\n if (quiz && isEdit) {\n const action = await dispatch(\n editQuizAdmin({\n id: quiz.id,\n data: {\n ...rest,\n startDate: startDate?.toISOString() ?? '',\n endDate: endDate?.toISOString() ?? null,\n isGraded: isGraded === 'graded',\n duration: duration === 0 ? null : duration,\n activities:\n activities?.map((activity) => {\n const { title, sortIndex, items, originId } = activity;\n\n return {\n id: originId,\n title,\n sortIndex,\n items: items?.map((item) => {\n const {\n article,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions,\n type,\n isMultiple,\n rightAnswer,\n image,\n originId: originIdItem,\n } = item;\n\n if (type === 1) {\n return {\n id: originIdItem,\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n type,\n isMultiple,\n image,\n };\n }\n\n return {\n id: originIdItem,\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions: textOptions.map((textOption) => ({\n id: textOption.originId,\n text: textOption.text,\n })),\n type,\n isMultiple,\n rightAnswer,\n image,\n };\n }),\n };\n }) ?? [],\n },\n })\n );\n\n if (isFulfilled(action)) {\n setIsSubmitting(false);\n navigate(`/quiz/admin-quiz`, {\n replace: true,\n });\n }\n\n if (isRejected(action) && action.payload) {\n setIsSubmitting(false);\n if (action.payload.content.errors) {\n Object.values(action.payload.content.errors).forEach(\n (errorItem) =>\n errorItem?.forEach((error) => {\n addNotification({\n type: 'error',\n title: error.message,\n });\n })\n );\n }\n }\n } else {\n const action = await dispatch(\n createQuizAdmin({\n ...rest,\n startDate: startDate?.toISOString() ?? '',\n endDate: endDate?.toISOString() ?? '',\n isGraded: isGraded === 'graded',\n duration: duration === 0 ? null : duration,\n activities: activities.map((activity) => {\n const { title, sortIndex, items } = activity;\n\n return {\n title,\n sortIndex,\n items: items.map((item) => {\n const {\n article,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions,\n type,\n isMultiple,\n rightAnswer,\n image,\n } = item;\n\n if (type === 1) {\n return {\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions: [],\n type,\n isMultiple,\n rightAnswer: [],\n image,\n };\n }\n\n return {\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions: textOptions.map((textOption) => ({\n id: textOption.originId,\n text: textOption.text,\n })),\n type,\n isMultiple,\n rightAnswer,\n image,\n };\n }),\n };\n }),\n })\n );\n\n if (isFulfilled(action) && action.payload) {\n setIsSubmitting(false);\n navigate(`/quiz/admin-quiz`, {\n replace: true,\n });\n }\n\n if (isRejected(action) && action.payload) {\n setIsSubmitting(false);\n if (action.payload.content.errors) {\n Object.values(action.payload.content.errors).forEach(\n (errorItem) =>\n errorItem?.forEach((error) => {\n addNotification({\n type: 'error',\n title: error.message,\n });\n })\n );\n }\n }\n }\n } else if (isUserQuiz) {\n if (quiz && isEdit) {\n const action = await dispatch(\n editQuizUser({\n id: quiz.id,\n data: {\n ...rest,\n startDate: startDate?.toISOString() ?? '',\n endDate: endDate?.toISOString() ?? null,\n isGraded: isGraded === 'graded',\n duration: duration === 0 ? null : duration,\n showCaption: Boolean(showCaption),\n restrictNonInstitutional: restrictNonInstitutional ?? false,\n activities:\n activities?.map((activity) => {\n const { title, sortIndex, items, originId } = activity;\n\n return {\n id: originId,\n title,\n sortIndex,\n items: items?.map((item) => {\n const {\n article,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions,\n type,\n isMultiple,\n rightAnswer,\n image,\n originId: originIdItem,\n } = item;\n\n if (type === 1) {\n return {\n id: originIdItem,\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n type,\n isMultiple,\n image,\n };\n }\n\n return {\n id: originIdItem,\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions: textOptions.map((textOption) => ({\n id: textOption.originId,\n text: textOption.text,\n })),\n type,\n isMultiple,\n rightAnswer,\n image,\n };\n }),\n };\n }) ?? [],\n },\n })\n );\n\n if (isFulfilled(action)) {\n setIsSubmitting(false);\n navigate(isCustomerQuiz ? `/quiz/customer-quiz` : `/quiz`, {\n replace: true,\n });\n }\n if (isRejected(action) && action.payload) {\n setIsSubmitting(false);\n if (action.payload.content && action.payload.content.errors) {\n Object.values(action.payload.content.errors).forEach(\n (errorItem) =>\n errorItem?.forEach((error) => {\n addNotification({\n type: 'error',\n title: error.message,\n });\n })\n );\n } else if (action.payload.message) {\n addNotification({\n type: 'error',\n title: action.payload.message,\n });\n }\n }\n } else {\n const action = await dispatch(\n createQuizUser({\n ...rest,\n startDate: startDate?.toISOString() ?? '',\n endDate: endDate?.toISOString() ?? '',\n isGraded: isGraded === 'graded',\n duration: duration === 0 ? null : duration,\n restrictNonInstitutional: false,\n activities: activities.map((activity) => {\n const { title, sortIndex, items } = activity;\n\n return {\n title,\n sortIndex,\n items: items.map((item) => {\n const {\n article,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions,\n type,\n isMultiple,\n rightAnswer,\n image,\n } = item;\n\n if (type === 1) {\n return {\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions: [],\n type,\n isMultiple,\n rightAnswer: [],\n image,\n };\n }\n\n return {\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions: textOptions.map((textOption) => ({\n id: textOption.originId,\n text: textOption.text,\n })),\n type,\n isMultiple,\n rightAnswer,\n image,\n };\n }),\n };\n }),\n })\n );\n\n if (isFulfilled(action) && action.payload) {\n setIsSubmitting(false);\n navigate(isCustomerQuiz ? `/quiz/customer-quiz` : `/quiz/my-quiz`, {\n replace: true,\n });\n }\n\n if (isRejected(action) && action.payload) {\n setIsSubmitting(false);\n if (action.payload.content.errors) {\n Object.values(action.payload.content.errors).forEach(\n (errorItem) =>\n errorItem?.forEach((error) => {\n addNotification({\n type: 'error',\n title: error.message,\n });\n })\n );\n }\n }\n }\n } else {\n if (quiz && isEdit) {\n const action = await dispatch(\n editQuiz({\n id: quiz.id,\n data: {\n ...rest,\n activities:\n activities?.map((activity) => {\n const { title, sortIndex, items, originId } = activity;\n\n return {\n id: originId,\n title,\n sortIndex,\n items: items?.map((item) => {\n const {\n article,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions,\n type,\n isMultiple,\n rightAnswer,\n image,\n originId: originIdItem,\n } = item;\n\n if (type === 1) {\n return {\n id: originIdItem,\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n type,\n isMultiple,\n image,\n };\n }\n\n return {\n id: originIdItem,\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions: textOptions.map((textOption) => ({\n id: textOption.originId,\n text: textOption.text,\n })),\n type,\n isMultiple,\n rightAnswer,\n image,\n };\n }),\n };\n }) ?? [],\n },\n })\n );\n\n if (isFulfilled(action)) {\n setIsSubmitting(false);\n navigate(`/quiz`, { replace: true });\n }\n if (isRejected(action) && action.payload) {\n setIsSubmitting(false);\n if (action.payload.content && action.payload.content.errors) {\n Object.values(action.payload.content.errors).forEach(\n (errorItem) =>\n errorItem?.forEach((error) => {\n addNotification({\n type: 'error',\n title: error.message,\n });\n })\n );\n } else if (action.payload.message) {\n addNotification({\n type: 'error',\n title: action.payload.message,\n });\n }\n }\n } else {\n const action = await dispatch(\n createNewQuiz({\n ...rest,\n article: rest.article ?? 0,\n activities: activities.map((activity) => {\n const { title, sortIndex, items } = activity;\n\n return {\n title,\n sortIndex,\n items: items.map((item) => {\n const {\n article,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions,\n type,\n isMultiple,\n rightAnswer,\n image,\n } = item;\n\n if (type === 1) {\n return {\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions: [],\n type,\n isMultiple,\n rightAnswer: [],\n image,\n };\n }\n\n return {\n article: article?.videoData.articleId ?? null,\n sortIndex: sortIndexItem,\n title: titleItem,\n textOptions: textOptions.map((textOption) => ({\n id: textOption.originId,\n text: textOption.text,\n })),\n type,\n isMultiple,\n rightAnswer,\n image,\n };\n }),\n };\n }),\n })\n );\n\n if (isFulfilled(action) && action.payload) {\n setIsSubmitting(false);\n navigate(`/quiz`, {\n replace: true,\n });\n }\n\n if (isRejected(action) && action.payload) {\n setIsSubmitting(false);\n if (action?.payload?.content?.errors) {\n Object.values(action.payload.content.errors).forEach(\n (errorItem) =>\n errorItem?.forEach((error) => {\n addNotification({\n type: 'error',\n title: error.message,\n });\n })\n );\n }\n }\n }\n }\n }, [dispatch, quiz, isLibrary, isAdminQuiz, isEdit, isUserQuiz]);\n\n return (\n \n \n \n );\n }\n);\n","import { QuizType } from '@/redux/reducers/quizzes/quizSlice';\nimport React, {useCallback} from 'react';\nimport { FormQuiz } from '../FormQuiz';\nimport {Navigate, useParams} from 'react-router-dom';\nimport {useQuery} from \"react-query\";\nimport {\n getAdminQuizById,\n getQuiz,\n getQuizLibraryById,\n getQuizTemplateByArticleId, getUserQuizById,\n} from '@/features/Quiz/api/getQuizzes';\nimport {LoadingSpinner} from \"@/components/LoadingSpinner\";\nimport {ErrorBlock} from \"@/components/ErrorBlock\";\nimport {useAuth} from \"@/context/AuthContext\";\n\ntype Props = {\n isLibrary?: boolean;\n isAdminQuiz?: boolean;\n isUserQuiz?: boolean;\n}\n\nexport const CreateQuiz = ({ isLibrary = false, isAdminQuiz = false, isUserQuiz = false }: Props) => {\n const { user } = useAuth();\n const isSuperAdmin = user?.roles.includes('ROLE_SUPER_ADMIN');\n\n const { articleId, quizId, quizLibraryId, adminQuizId, userQuizId } = useParams();\n\n const quizQueryKey = useCallback(() => {\n if (adminQuizId) {\n return `getAdminQuiz-${adminQuizId}`\n }\n\n if (userQuizId) {\n return `getUserQuiz-${userQuizId}`;\n }\n\n if (quizLibraryId) {\n return `getQuizLibrary-${quizLibraryId}`\n }\n\n if (articleId) {\n return `getQuizArticle-${articleId}`\n }\n\n return `getQuiz-${quizId}`;\n }, [adminQuizId, quizLibraryId, quizId, articleId]);\n\n const { data, isLoading, isError, error } = useQuery(\n quizQueryKey(),\n async () => {\n if (quizId || quizLibraryId || adminQuizId || articleId || userQuizId) {\n if (userQuizId) {\n return await getUserQuizById(Number(userQuizId));\n }\n if (adminQuizId) {\n return await getAdminQuizById(Number(adminQuizId));\n }\n if (quizLibraryId) {\n return await getQuizLibraryById(Number(quizLibraryId));\n }\n if (articleId) {\n const action = await getQuizTemplateByArticleId(Number(articleId));\n\n return {\n id: 0,\n article: Number(articleId),\n title: '',\n active: false,\n startDate: '',\n endDate: '',\n duration: 0,\n countOfQuestions: 0,\n editable: false,\n activities: action.activities,\n tags: [],\n createdAt: '',\n updatedAt: null,\n };\n }\n\n return await getQuiz(Number(quizId));\n }\n\n return null;\n }, {\n useErrorBoundary: (error: any) => error.response?.status >= 400,\n },\n );\n\n if (!isSuperAdmin && !isLibrary && !isAdminQuiz && !isUserQuiz) {\n return \n }\n\n if (isLoading) return ;\n if (error?.statusCode === 404 || isError) return ;\n\n return ;\n};\n","import { QuizType } from \"@/redux/reducers/quizzes/quizSlice\";\nimport React, { useCallback } from \"react\";\nimport { FormQuiz } from \"../FormQuiz\";\nimport { Navigate, useParams } from \"react-router-dom\";\nimport { LoadingSpinner } from \"@/components/LoadingSpinner\";\nimport { ErrorBlock } from \"@/components/ErrorBlock\";\nimport { useQuery } from \"react-query\";\nimport {\n getAdminQuizById,\n getQuiz,\n getQuizLibraryById,\n getUserQuizById,\n} from \"@/features/Quiz/api/getQuizzes\";\nimport { useAuth } from \"@/context/AuthContext\";\nimport { Quiz } from \"@/features/Quiz\";\n\ntype Props = {\n isLibrary?: boolean;\n isAdminQuiz?: boolean;\n isUserQuiz?: boolean;\n};\n\nexport const EditQuiz = ({\n isLibrary = false,\n isAdminQuiz = false,\n isUserQuiz = false,\n}: Props) => {\n const { user } = useAuth();\n const isSuperAdmin = user?.roles.includes(\"ROLE_SUPER_ADMIN\");\n\n const { quizId, quizLibraryId, adminQuizId, userQuizId, customerQuizId } =\n useParams();\n\n const quizQueryKey = useCallback(() => {\n if (userQuizId) {\n return `getUserQuiz-${userQuizId}`;\n }\n if (adminQuizId) {\n return `getAdminQuiz-${adminQuizId}`;\n }\n if (quizLibraryId) {\n return `getQuizLibrary-${quizLibraryId}`;\n }\n if (customerQuizId) {\n return `getQuizLibrary-${customerQuizId}`;\n }\n return `getQuiz-${quizId}`;\n }, [adminQuizId, quizLibraryId, quizId, customerQuizId]);\n\n const { data, isLoading, isError, error } = useQuery(\n quizQueryKey(),\n async () => {\n if (quizId || quizLibraryId || adminQuizId || userQuizId) {\n if (userQuizId) {\n return await getUserQuizById(Number(userQuizId));\n }\n if (adminQuizId) {\n return await getAdminQuizById(Number(adminQuizId));\n }\n if (quizLibraryId) {\n return await getQuizLibraryById(Number(quizLibraryId));\n }\n if (customerQuizId) {\n return await getAdminQuizById(Number(customerQuizId));\n }\n return await getQuiz(Number(quizId));\n }\n\n return null;\n },\n {\n useErrorBoundary: (error: any) => error.response?.status >= 400,\n }\n );\n\n if (!isSuperAdmin && !isUserQuiz && !isLibrary && !isAdminQuiz) {\n return ;\n }\n\n if (isLoading || (!isError && !data)) return ;\n if (error?.statusCode === 404 || isError)\n return ;\n\n return (\n \n );\n};\n","import { modelShaper } from '@/utils/helpers';\nimport React, { Fragment, useCallback, useEffect, useState } from 'react';\nimport { Navigate, useNavigate, useParams, useLocation } from 'react-router-dom';\nimport { Box, Checkbox, CheckboxGroup, Flex, Image, Stack, Text } from '@chakra-ui/react';\nimport { useQuery } from 'react-query';\nimport { getAdminQuizById, getQuiz, getQuizLibraryById, getUserQuizById } from '../../api/getQuizzes';\nimport { ViewQuizVideoContainer } from '../ViewQuizVideoContainer';\nimport { QuizCheckboxIcon } from '../QuizCheckboxIcon';\nimport { LoadingSpinner } from '@/components/LoadingSpinner';\nimport { ErrorBlock } from '@/components/ErrorBlock';\nimport { useAuth } from '@/context/AuthContext';\nimport parse from 'html-react-parser';\nimport Icon from '@/components/Icon';\n\nexport const ViewQuiz = () => {\n const { user } = useAuth();\n const isSuperAdmin = user?.roles.includes('ROLE_SUPER_ADMIN');\n\n const navigate = useNavigate();\n const { id, quizLibraryId, adminQuizId, userQuizId, myQuizId, customerQuizId } = useParams();\n const { pathname } = useLocation();\n\n const isCustomerQuiz = pathname?.includes('customer-quiz');\n\n const quizQueryKey = useCallback(() => {\n if (userQuizId) {\n return `getUserQuiz-${userQuizId}`;\n }\n if (adminQuizId) {\n return `getAdminQuiz-${adminQuizId}`;\n }\n if (quizLibraryId) {\n return `getQuizLibrary-${quizLibraryId}`;\n }\n if (myQuizId) {\n return `myQuizId-${myQuizId}`;\n }\n if (customerQuizId) {\n return `customerQuizId-${customerQuizId}`;\n }\n return `getQuiz-${id}`;\n }, [userQuizId, adminQuizId, quizLibraryId, id, myQuizId, customerQuizId]);\n\n const { data, isLoading, isError, error } = useQuery(\n quizQueryKey(),\n async () => {\n if (id || quizLibraryId || adminQuizId || userQuizId || myQuizId || customerQuizId) {\n if (userQuizId) {\n return await getUserQuizById(Number(userQuizId));\n }\n if (adminQuizId) {\n return await getAdminQuizById(Number(adminQuizId));\n }\n if (quizLibraryId) {\n return await getQuizLibraryById(Number(quizLibraryId));\n }\n if (myQuizId) {\n return await getUserQuizById(Number(myQuizId));\n }\n return await getQuiz(Number(id));\n }\n\n return null;\n },\n {\n useErrorBoundary: (error: any) => error.response?.status >= 400,\n }\n );\n\n const [tabActivity, setTabActivity] = useState(null);\n const [textOptions, setTextOptions] = useState<\n {\n activityId: number;\n items: {\n itemId: number;\n value: string[];\n }[];\n }[]\n >(\n data?.activities\n ?.sort((a, b) => a.sortIndex - b.sortIndex)\n .map((activityItem) => {\n return {\n activityId: activityItem.id ?? 0,\n items:\n activityItem.items\n ?.filter((item) => item.type === 2)\n .map((item) => {\n return {\n itemId: item.id ?? 0,\n value: [],\n };\n }) ?? [],\n };\n }) ?? []\n );\n\n const timeLimit = useCallback(() => {\n if (data && data.duration) {\n const hours = Math.floor(data.duration / 60);\n const minutes = data.duration % 60;\n return `${hours ? `${hours}:` : ''}${minutes ? `${Math.floor(minutes)}` : '00'}:00`;\n }\n }, []);\n\n const handleTextOptionsChange = useCallback(\n (activityId: number, activityItemId: number, isMultiple = false) =>\n (value: string[]) => {\n setTextOptions((state) => {\n const activitiesSelect = state.find((item) => item.activityId === activityId);\n const otherActivities = state.filter((item) => item.activityId !== activityId);\n\n if (activitiesSelect) {\n return [\n ...otherActivities,\n {\n activityId: activitiesSelect.activityId,\n items: activitiesSelect.items.map((item) => {\n if (item.itemId === activityItemId) {\n return {\n itemId: item.itemId,\n value: isMultiple ? value : value.filter((dataValue) => !item.value.includes(dataValue)),\n };\n }\n return item;\n }),\n },\n ];\n }\n\n return otherActivities;\n });\n },\n []\n );\n\n const handleBackToQuizzesClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n\n navigate(`/quiz`, {\n replace: true,\n state: {\n tabMyQuizzes: true,\n },\n });\n },\n [navigate]\n );\n\n useEffect(() => {\n if (data) {\n setTextOptions(\n data.activities\n ?.sort((a, b) => a.sortIndex - b.sortIndex)\n .map((activityItem) => {\n return {\n activityId: activityItem.id ?? 0,\n items:\n activityItem.items\n ?.filter((item) => item.type === 2)\n .map((item) => {\n return {\n itemId: item.id ?? 0,\n value: [],\n };\n }) ?? [],\n };\n }) ?? []\n );\n\n data.activities && setTabActivity(data.activities[0].id);\n }\n }, [data]);\n\n if (!isSuperAdmin && !quizLibraryId && !adminQuizId && !userQuizId && !myQuizId) {\n return ;\n }\n\n if (isLoading) return ;\n if (error?.statusCode === 404 || isError) return ;\n\n return (\n <>\n {data && (\n \n \n <>\n \n\n {data.duration && (\n <>\n \n Time Limit\n \n {timeLimit()}\n >\n )}\n\n {data.endDate && (\n <>\n \n Deadline\n \n {new Date(data.endDate).toLocaleString()}\n >\n )}\n\n {isCustomerQuiz && (\n <>\n \n Type Of Quiz: {data?.isGraded ? 'Graded' : 'Ungraded'}\n \n >\n )}\n\n {!id && !isCustomerQuiz && (\n <>\n \n \n Activities\n \n \n\n {data.activities?.map((activity, i) => (\n setTabActivity(activity.id)}\n key={i}>\n \n \n {activity.title ?? ''}\n \n \n ))}\n >\n )}\n\n {userQuizId && (\n \n \n \n Access Type:\n \n \n \n \n {!data?.restrictNonInstitutional ? 'Open' : 'Restricted'}\n \n \n {data?.restrictNonInstitutional\n ? 'Only students from your institute can take this quiz using their institutional email'\n : 'Students can take quiz using any email address'}\n \n \n \n )}\n >\n \n\n \n \n \n \n \n Activity 1 of {data?.activities && data.activities.length > 0 ? data.activities.length : '1'}\n \n \n {data.activities?.find((item) => item.id === tabActivity)?.title ?? ''}\n \n \n\n \n {data.activities\n ?.filter((item) => item.id === tabActivity)\n .map((activity, i) => (\n \n {activity.items &&\n modelShaper(activity.items)\n ?.filter(\n (item) =>\n !['lab_manual_procedure', 'lab_manual_prep'].includes(item?.article?.articleType)\n )\n .map((activityItem, i: number) => (\n \n \n \n {activityItem?.type === 1 ? (\n \n \n \n \n \n \n ) : (\n \n \n Question {activityItem.questionOrder}\n \n \n\n {activityItem.image && (\n \n \n \n )}\n\n data.activityId === activity?.id)\n ?.items.find((data) => data.itemId === activityItem.id)\n ?.value ?? []\n }>\n \n {activityItem.textOptions &&\n activityItem.textOptions.map(\n (\n textOption: {\n id: number;\n text: string;\n },\n i: number\n ) => {\n const textOptionsSelected =\n textOptions\n .find(\n (data) =>\n data.activityId === activity?.id\n )\n ?.items.find(\n (data) =>\n data.itemId === activityItem.id\n )?.value ?? [];\n return (\n \n }\n fontSize={'18px'}\n className={\n !data.isGraded &&\n textOptionsSelected.includes(\n `${textOption.id}`\n )\n ? (\n activityItem.rightAnswer ??\n []\n ).includes(textOption.id)\n ? 'textOptionsGood'\n : 'textOptionsFail'\n : ''\n }>\n {parse(textOption.text)}\n \n \n );\n }\n )}\n \n \n \n )}\n \n \n \n ))}\n \n ))}\n \n \n \n \n \n )}\n >\n );\n};\n","import { rebuildSectionQuizLibrary } from '@/features/Quiz/api/getQuizzes';\nimport { useNotificationStore } from '@/stores/notifications';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport React, { useEffect, useState } from 'react';\nimport {\n Modal,\n ModalOverlay,\n ModalContent,\n ModalHeader,\n ModalFooter,\n ModalBody,\n ModalCloseButton,\n Button,\n Flex,\n useDisclosure,\n Select,\n Radio,\n RadioGroup,\n FormControl,\n FormErrorMessage,\n} from '@chakra-ui/react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport * as yup from 'yup';\n\ntype Props = {\n isOpen: boolean;\n onClose: () => void;\n title?: string;\n type?: number;\n isAllUpdate?: boolean;\n};\n\nconst rebuildSchema = yup.object().shape({\n type: yup.string().typeError('This field is required').required('This field is required'),\n isAllUpdate: yup.string().required('This field is required'),\n});\n\nconst RebuildQuizModal = ({ isOpen, onClose }: Props) => {\n const { isOpen: isOpenConfirmModal, onOpen: onOpenConfirmModal, onClose: onCloseConfirmModal } = useDisclosure();\n const [type, setType] = useState(undefined);\n const [title, setTitle] = useState('');\n const [isAllUpdate, setIsAllUpdate] = useState(false);\n const options = [\n { type: 1, title: 'Entire Quiz Library' },\n { type: 2, title: 'Core' },\n { type: 3, title: 'Science Education' },\n { type: 4, title: 'Lab Manual' },\n { type: 5, title: 'Business' },\n ];\n\n const methods = useForm<{ type: string | undefined; isAllUpdate: string }>({\n mode: 'onChange',\n resolver: yupResolver(rebuildSchema),\n defaultValues: {\n type: undefined,\n isAllUpdate: '0',\n },\n });\n\n const {\n register,\n handleSubmit,\n watch,\n setValue,\n setError,\n clearErrors,\n reset,\n formState: { errors },\n } = methods;\n\n const handleRebuild = () => {\n const type = watch('type');\n if (!type) {\n return setError('type', { message: 'This field is required' });\n }\n clearErrors();\n onOpenConfirmModal();\n setType(type ?? undefined);\n setTitle(options[Number(type) - 1].title);\n setIsAllUpdate(isAllUpdate);\n onClose();\n reset();\n };\n\n useEffect(() => {\n if (isOpen) {\n reset();\n setIsAllUpdate(false);\n setTitle('');\n }\n }, [isOpen]);\n\n return (\n <>\n \n \n >\n );\n};\n\nexport default RebuildQuizModal;\n\nexport const ConfirmModal = ({ isOpen, onClose, title, type, isAllUpdate }: Props) => {\n const [isLoading, setIsLoading] = useState(false);\n const { addNotification } = useNotificationStore();\n\n const handleRebuildQuiz = async () => {\n setIsLoading(true);\n\n try {\n await rebuildSectionQuizLibrary({ type: type as 1 | 2 | 3 | 4 | 5, isAllUpdate: isAllUpdate as boolean });\n\n onClose();\n addNotification({\n type: 'info',\n title: 'Rebuilding process has been added to the queue',\n });\n } catch (e: any) {\n addNotification({\n type: 'error',\n title: e?.message,\n });\n }\n\n setIsLoading(false);\n };\n\n return (\n \n \n \n Rebuild Quiz\n \n \n Are you sure you want to {isAllUpdate ? 'rebuild All Quizzes' : 'add only Missing Quizzes'} for{' '}\n {type === 1 ? (\n all sections\n ) : (\n <>\n {title} Quiz Library\n >\n )}\n ?\n \n\n \n \n \n \n \n \n );\n};\n","import { ActionButton } from '@/components/ActionButton';\nimport { IconName } from '@fortawesome/pro-solid-svg-icons';\nimport { rebuildQuizLibraryById } from '@/features/Quiz/api/getQuizzes';\nimport { useNotificationStore } from '@/stores/notifications';\nimport React, { ReactNode, useState } from 'react';\nimport { Tr, Td, Text, useDisclosure, Flex, Tooltip } from '@chakra-ui/react';\nimport { Link } from 'react-router-dom';\nimport { QuizLibrary } from '../../types';\nimport { DeleteQuizModal } from '@/features/Quiz/components/DeleteQuizModal';\nimport { useQti } from '@/api/qtiApi';\nimport InstitutionsModal from '@/features/Playlists/components/InstitutionsModal';\nimport { usePlaylistCC } from '@/api/ccApi';\nimport { InstitutionModalTypes } from '@/features/Playlists';\nimport { usePlaylistScorm } from '@/api/scormApi';\n\ntype QuizLibraryItemProps = {\n quiz: QuizLibrary;\n isSectionType: boolean;\n};\n\nconst TextEl = ({ children }: { children: ReactNode }) => (\n \n {children}\n \n);\n\nexport const QuizLibraryItem = ({ quiz, isSectionType }: QuizLibraryItemProps) => {\n const { isOpen, onOpen, onClose } = useDisclosure();\n const isInProcess = quiz?.processStatus === 0;\n const { isOpen: isInstitutionsOpen, onOpen: onInstitutionsOpen, onClose: onInstitutionsClose } = useDisclosure();\n const [type, setType] = useState(null);\n const [isLoading, setIsLoading] = useState(false);\n const { addNotification } = useNotificationStore();\n\n const downloadType = 'from_quiz_library';\n\n const { isLoading: isCCLoading, handleCCDownload } = usePlaylistCC({\n ccType: downloadType,\n ccId: quiz?.id ?? 0,\n title: quiz?.title ?? '',\n });\n\n const { isLoading: isQtiLoading, handleQtiDownload } = useQti({\n qtiType: downloadType,\n qtiId: quiz?.id ?? 0,\n title: quiz?.title ?? '',\n });\n\n const { isLoading: isScormLoading, handleScormDownload } = usePlaylistScorm({\n scormType: downloadType,\n scormId: quiz?.id ?? 0,\n playlistTitle: quiz?.title ?? '',\n });\n\n const handleOpenInstitutionsCC = () => {\n setType('cc');\n onInstitutionsOpen();\n };\n\n const handleOpenInstitutionsScorm = () => {\n setType('scorm');\n onInstitutionsOpen();\n };\n\n const handleOpenInstitutionsQti = () => {\n setType('qti');\n onInstitutionsOpen();\n };\n\n const handleRebuildQuiz = async () => {\n setIsLoading(true);\n try {\n await rebuildQuizLibraryById(quiz.id);\n addNotification({\n type: 'success',\n title: 'Quiz has been successfully rebuilt',\n });\n } catch (e: any) {\n addNotification({\n type: 'error',\n title: e?.message,\n });\n }\n setIsLoading(false);\n };\n const actionButtons = [\n {\n link: `/quiz/library/edit/${quiz.id}`,\n tooltip: 'Edit',\n icon: 'pencil',\n },\n {\n link: `/quiz/library/copy/${quiz.id}`,\n tooltip: 'Copy',\n icon: 'clone',\n },\n {\n tooltip: 'Download SCORM',\n icon: 'file-zipper',\n handleClick: handleOpenInstitutionsScorm,\n },\n {\n tooltip: 'Download QTI',\n icon: 'scroll',\n handleClick: handleOpenInstitutionsQti,\n },\n {\n tooltip: 'Download CC',\n icon: 'closed-captioning',\n handleClick: handleOpenInstitutionsCC,\n isLoading: isCCLoading,\n },\n ...(isSectionType\n ? [\n {\n tooltip: 'Rebuild quiz',\n icon: 'trowel-bricks',\n handleClick: handleRebuildQuiz,\n isLoading: isLoading,\n },\n ]\n : []),\n {\n tooltip: 'Delete',\n icon: 'trash',\n handleClick: onOpen,\n },\n ];\n\n return (\n <>\n \n \n \n \n \n \n {quiz.title}\n \n | \n\n \n {quiz.tags && quiz.tags.length ? quiz.tags?.map((item) => item.title).join(', ') : '-'}\n | \n \n {quiz.countOfQuestions ? `${quiz.countOfQuestions} Questions` : '-'}\n | \n \n \n {actionButtons.map(({ icon, handleClick, tooltip, link, isLoading }, index) => (\n \n ))}\n \n | \n
\n \n >\n );\n};\n","import Icon from '@/components/Icon';\nimport InstitutionsModal from '@/features/Playlists/components/InstitutionsModal';\nimport RebuildQuizModal from '@/features/Quiz/components/RebuildQuizModal';\nimport React, { useCallback, useEffect, ChangeEvent, useState } from 'react';\nimport { shallowEqual, useDispatch, useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { AppDispatch, RootState } from '@/redux/store';\nimport {\n getAllQuizzesLibrary,\n resetQuizLibraryPages,\n selectQuizLibraryActivePage,\n selectQuizLibraryPage,\n selectQuizLibraryLoading,\n selectQuizLibraryTotalPages,\n setQuizLibraryActivePage,\n} from '@/redux/reducers/quizzes/quizLibrary';\nimport { useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport {\n Box,\n Flex,\n Input,\n InputGroup,\n InputLeftElement,\n InputRightElement,\n Table,\n Tbody,\n Td,\n Thead,\n Tr,\n Spinner as SpinnerChakra,\n Button,\n TabList,\n Tab,\n Tabs,\n useDisclosure,\n} from '@chakra-ui/react';\nimport { FaSearch } from 'react-icons/fa';\nimport { HiX } from 'react-icons/hi';\nimport * as yup from 'yup';\nimport { QuizLibraryItem } from '../QuizLibraryItem';\nimport { debounce } from '@/utils/helpers';\nimport { Pagination } from '@/components/Pagination';\nimport { ThEl } from '@/features/Quiz/components/ArticlesQuiz';\n\nconst searchInputSchema = yup.object().shape({\n keyword: yup.string(),\n});\n\ntype SearchFormData = {\n keyword: string;\n keyword_section: string;\n};\n\nexport const QuizLibrary = () => {\n const dispatch = useDispatch();\n const { isOpen, onOpen, onClose } = useDisclosure();\n\n const activePage = useSelector(selectQuizLibraryActivePage, shallowEqual);\n const totalPages = useSelector(selectQuizLibraryTotalPages, shallowEqual);\n const quizzes = useSelector((state: RootState) => selectQuizLibraryPage(state, activePage), shallowEqual);\n const isLoading = useSelector(selectQuizLibraryLoading, shallowEqual);\n const [isTextbook, setIsTextbook] = useState(true);\n const [tabIndex, setTabIndex] = useState(0);\n\n const {\n register,\n handleSubmit,\n reset,\n formState: { isSubmitting },\n watch,\n getValues,\n } = useForm({\n resolver: yupResolver(searchInputSchema),\n defaultValues: {\n keyword: '',\n keyword_section: '',\n },\n });\n\n const values = getValues();\n\n const onSearchKeywordSubmit = useCallback(\n (values: SearchFormData) => {\n dispatch(resetQuizLibraryPages());\n dispatch(setQuizLibraryActivePage(1));\n\n dispatch(\n getAllQuizzesLibrary({\n activePage: 1,\n activeSearchKeyword: values.keyword,\n isTextbook: isTextbook,\n })\n );\n },\n [dispatch, isTextbook]\n );\n\n const onSearchKeywordChange = debounce(\n useCallback(\n (e: ChangeEvent) => {\n e.preventDefault();\n\n dispatch(resetQuizLibraryPages());\n dispatch(setQuizLibraryActivePage(1));\n\n dispatch(\n getAllQuizzesLibrary({\n activePage: 1,\n activeSearchKeyword: e.target.name === 'keyword' ? e.target.value ?? '' : values.keyword,\n isTextbook: isTextbook,\n })\n );\n },\n [dispatch, values.keyword, isTextbook]\n ),\n 300\n );\n\n const handleReset = useCallback(() => {\n reset();\n\n dispatch(\n getAllQuizzesLibrary({\n activePage: 1,\n activeSearchKeyword: '',\n isTextbook: isTextbook,\n })\n );\n }, []);\n\n const handlePaginationChange = useCallback(\n (page: number) => {\n dispatch(setQuizLibraryActivePage(page));\n },\n [dispatch]\n );\n\n useEffect(() => {\n dispatch(\n getAllQuizzesLibrary({\n activePage,\n activeSearchKeyword: values.keyword ?? '',\n isTextbook: isTextbook,\n })\n );\n }, [dispatch, activePage, isTextbook]);\n\n useEffect(\n () => () => {\n dispatch(setQuizLibraryActivePage(1));\n },\n [dispatch]\n );\n\n const handleTabsChange = (index: number) => {\n setTabIndex(index);\n setIsTextbook(index === 0);\n dispatch(setQuizLibraryActivePage(1));\n };\n\n return (\n <>\n \n \n \n \n \n Textbooks\n \n \n Sections\n \n \n \n \n \n \n \n \n\n {tabIndex === 1 && (\n \n )}\n\n \n \n \n \n \n {quizzes.length > 0 && (\n \n \n \n Title\n \n \n Subjects\n \n Questions\n Actions\n
\n \n )}\n \n {quizzes.length > 0 ? (\n quizzes.map((quiz) => )\n ) : (\n <>\n {!isLoading && (\n \n \n No list items\n | \n
\n )}\n >\n )}\n \n
\n\n {totalPages > 1 && (\n \n \n \n )}\n \n \n >\n );\n};\n","import Icon from '@/components/Icon';\nimport React, { useCallback, useEffect, ChangeEvent } from 'react';\nimport { shallowEqual, useDispatch, useSelector } from 'react-redux';\nimport { AppDispatch, RootState } from '@/redux/store';\nimport { useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport {\n Box,\n Flex,\n Input,\n InputGroup,\n InputLeftElement,\n InputRightElement,\n Table,\n Tbody,\n Td,\n Thead,\n Tr,\n Spinner as SpinnerChakra,\n Button,\n} from '@chakra-ui/react';\nimport { FaSearch } from 'react-icons/fa';\nimport { HiX } from 'react-icons/hi';\nimport * as yup from 'yup';\nimport { debounce } from '@/utils/helpers';\nimport { Pagination } from '@/components/Pagination';\nimport { ThEl } from '@/features/Quiz/components/ArticlesQuiz';\nimport { Link } from 'react-router-dom';\nimport {\n getAllQuizzesAdmin,\n resetQuizAdminPages,\n selectQuizAdminActivePage,\n selectQuizAdminLoading,\n selectQuizAdminPage,\n selectQuizAdminTotalPages,\n setQuizAdminActivePage,\n} from '@/redux/reducers/quizzes/quizAdmin';\nimport { AdminQuizItem } from '@/features/Quiz/components/AdminQuizItem';\nimport { useAuth } from '@/context/AuthContext';\n\nconst searchInputSchema = yup.object().shape({\n keyword: yup.string(),\n});\n\ntype SearchFormData = {\n keyword: string;\n};\n\nexport const AdminQuiz = () => {\n const dispatch = useDispatch();\n\n const activePage = useSelector(selectQuizAdminActivePage, shallowEqual);\n const totalPages = useSelector(selectQuizAdminTotalPages, shallowEqual);\n const quizzes = useSelector((state: RootState) => selectQuizAdminPage(state, activePage), shallowEqual);\n const isLoading = useSelector(selectQuizAdminLoading, shallowEqual);\n const { user } = useAuth();\n const isSuperAdmin = user?.roles.includes('ROLE_SUPER_ADMIN');\n\n const {\n register,\n handleSubmit,\n reset,\n formState: { isSubmitting },\n watch,\n getValues,\n setValue,\n } = useForm({\n resolver: yupResolver(searchInputSchema),\n defaultValues: {\n keyword: '',\n },\n });\n\n const values = getValues();\n\n const onSearchKeywordSubmit = useCallback(\n (values: SearchFormData) => {\n dispatch(resetQuizAdminPages());\n dispatch(setQuizAdminActivePage(1));\n\n dispatch(\n getAllQuizzesAdmin({\n activePage: 1,\n activeSearchKeyword: values.keyword,\n })\n );\n },\n [dispatch]\n );\n\n const onSearchKeywordChange = debounce(\n useCallback(\n (e: ChangeEvent) => {\n e.preventDefault();\n\n setValue('keyword', e.target.value);\n\n dispatch(resetQuizAdminPages());\n dispatch(setQuizAdminActivePage(1));\n\n dispatch(\n getAllQuizzesAdmin({\n activePage: 1,\n activeSearchKeyword: e.target.value ?? '',\n })\n );\n },\n [dispatch]\n ),\n 300\n );\n\n const handleReset = useCallback(() => {\n reset();\n\n dispatch(\n getAllQuizzesAdmin({\n activePage: 1,\n activeSearchKeyword: '',\n })\n );\n }, []);\n\n const handlePaginationChange = useCallback(\n (page: number) => {\n dispatch(setQuizAdminActivePage(page));\n },\n [dispatch]\n );\n\n useEffect(() => {\n dispatch(\n getAllQuizzesAdmin({\n activePage,\n activeSearchKeyword: values.keyword ?? '',\n })\n );\n }, [dispatch, activePage]);\n\n useEffect(\n () => () => {\n dispatch(setQuizAdminActivePage(1));\n },\n [dispatch]\n );\n\n return (\n \n \n \n \n {isSuperAdmin && (\n \n )}\n \n \n \n \n {quizzes.length > 0 && (\n \n \n \n Title\n \n \n Subjects\n \n Questions\n Deadline\n Actions\n
\n \n )}\n \n {quizzes.length > 0 ? (\n quizzes.map((quiz) => )\n ) : (\n <>\n {!isLoading && (\n \n \n No list items\n | \n
\n )}\n >\n )}\n \n
\n\n {totalPages > 1 && (\n \n \n \n )}\n \n \n );\n};\n","import { useAuth } from '@/context/AuthContext';\nimport React, { ReactNode, useCallback, useState } from 'react';\nimport { Tr, Td, Text, useDisclosure, Flex, Box, Tooltip, Spinner } from '@chakra-ui/react';\nimport { Link } from 'react-router-dom';\nimport { QuizLibrary } from '../../types';\nimport { DeleteQuizModal } from '@/features/Quiz/components/DeleteQuizModal';\nimport Icon from '@/components/Icon';\n\nimport { format } from 'date-fns';\nimport { useQti } from '@/api/qtiApi';\nimport InstitutionsModal from '@/features/Playlists/components/InstitutionsModal';\nimport { usePlaylistCC } from '@/api/ccApi';\nimport { InstitutionModalTypes } from '@/features/Playlists';\nimport { usePlaylistScorm } from '@/api/scormApi';\nimport { useNotificationStore } from '@/stores/notifications';\nimport { DistributeQuizModal } from '../DistributeQuizModal';\nimport { saveSharedCustomerQuizById, saveSharedUsersAdminQuizById } from '@/features/Quiz/api/getQuizzes';\n\ntype Props = {\n quiz: QuizLibrary;\n isAdminQuiz: boolean;\n};\n\nconst TextEl = ({ children }: { children: ReactNode }) => (\n \n {children}\n \n);\n\nexport const CustomerQuizItem = ({ quiz, isAdminQuiz }: Props) => {\n const { isOpen, onOpen, onClose } = useDisclosure();\n const { user } = useAuth();\n const isSuperAdmin = user?.roles.includes('ROLE_SUPER_ADMIN');\n\n const { isOpen: isInstitutionsOpen, onOpen: onInstitutionsOpen, onClose: onInstitutionsClose } = useDisclosure();\n const [type, setType] = useState(null);\n const { addNotification } = useNotificationStore();\n const [error, setError] = useState('');\n const [openDistributeQuiz, setOpenDistributeQuiz] = useState(false);\n const downloadType = 'from_quiz';\n\n const { isLoading: isQtiLoading, handleQtiDownload } = useQti({\n qtiType: downloadType,\n qtiId: quiz?.id ?? 0,\n title: quiz?.title ?? '',\n });\n\n const { isLoading: isCCLoading, handleCCDownload } = usePlaylistCC({\n ccType: downloadType,\n ccId: quiz?.id ?? 0,\n title: quiz?.title ?? '',\n });\n\n const { isLoading: isScormLoading, handleScormDownload } = usePlaylistScorm({\n scormType: downloadType,\n scormId: quiz?.id ?? 0,\n playlistTitle: quiz?.title ?? '',\n });\n\n const handleOpenInstitutionsCC = () => {\n setType('cc');\n onInstitutionsOpen();\n };\n\n const handleOpenInstitutionsScorm = () => {\n setType('scorm');\n onInstitutionsOpen();\n };\n\n const handleOpenInstitutionsQti = () => {\n setType('qti');\n onInstitutionsOpen();\n };\n\n\n const handleDistributeQuizClose = useCallback(() => {\n setOpenDistributeQuiz(false);\n setError('')\n }, []);\n\n const handleDistributeQuizOpen = useCallback((e: any) => {\n e.preventDefault();\n\n setOpenDistributeQuiz(true);\n }, []);\n\n const handleDistributeQuizSubmit = useCallback(async (data: any) => {\n try {\n console.log(data)\n const res = await saveSharedCustomerQuizById(quiz?.id ?? 0, data);\n if (res.already_shared.length) {\n addNotification({\n type: 'error',\n title: `Already shared: ${res.already_shared.join(', ')}`,\n });\n }\n if (res.shared.length) {\n addNotification({\n type: 'success',\n title: `Shared: ${res.shared.join(', ')}`,\n });\n }\n if (res.not_access.length) {\n addNotification({\n type: 'error',\n title: `Not access: ${res.not_access.join(', ')}`,\n });\n }\n if (res.not_found.length) {\n addNotification({\n type: 'error',\n title: `Not found: ${res.not_found.join(', ')}`,\n });\n }\n setError('');\n } catch (e: any) {\n setError(e?.message);\n throw e;\n }\n }, [isSuperAdmin]);\n\n return (\n <>\n \n \n \n \n \n \n {quiz.title}\n \n \n | \n\n \n {quiz?.restrictNonInstitutional ? 'Restricted' : 'Open'}\n | \n\n \n {`${quiz.createdBy?.firstName ?? ''} ${quiz.createdBy?.lastName ?? ''}`}\n | \n \n {quiz?.createdBy?.email ?? '-'}\n | \n \n {quiz.createdAt ? format(new Date(quiz.createdAt), 'MM/dd/yyyy') : '-'}\n | \n \n {quiz?.endDate ? format(new Date(quiz.endDate), 'MM/dd/yyyy') : quiz?.endDate === null ? '-' : 'Expired'}\n | \n \n \n {isSuperAdmin && (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n >\n )}\n \n \n {isScormLoading ? (\n \n ) : (\n \n \n \n )}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {isCCLoading ? (\n \n ) : (\n \n \n \n )}\n \n \n \n \n \n \n \n \n \n \n | \n
\n >\n );\n};\n","import React, { useCallback, useEffect, ChangeEvent, useState } from 'react';\nimport { shallowEqual, useDispatch, useSelector } from 'react-redux';\nimport { AppDispatch, RootState } from '@/redux/store';\nimport { useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport {\n Box,\n Flex,\n Input,\n InputGroup,\n InputLeftElement,\n InputRightElement,\n Table,\n Tbody, Td,\n Thead,\n Tr,\n Spinner as SpinnerChakra, Stack, Switch, Text\n} from '@chakra-ui/react';\nimport { FaSearch } from 'react-icons/fa';\nimport { HiX } from 'react-icons/hi';\nimport * as yup from 'yup';\nimport { debounce } from '@/utils/helpers';\nimport { Pagination } from \"@/components/Pagination\";\nimport { ThEl } from \"@/features/Quiz/components/ArticlesQuiz\";\nimport {\n getAllCustomerQuizzes,\n resetQuizCustomerPages,\n selectQuizCustomerActivePage,\n selectQuizCustomerLoading, selectQuizCustomerPage,\n selectQuizCustomerTotalPages, setQuizCustomerActivePage\n} from \"@/redux/reducers/quizzes/quizCustomer\";\nimport { CustomerQuizItem } from \"@/features/Quiz/components/CustomerQuizItem\";\n\nconst searchInputSchema = yup.object().shape({\n keyword: yup.string(),\n});\n\ntype SearchFormData = {\n keyword: string;\n};\n\nexport const CustomerQuiz = () => {\n const dispatch = useDispatch();\n\n const activePage = useSelector(selectQuizCustomerActivePage, shallowEqual);\n const totalPages = useSelector(selectQuizCustomerTotalPages, shallowEqual);\n const quizzes = useSelector((state: RootState) => selectQuizCustomerPage(state, activePage), shallowEqual);\n const isLoading = useSelector(selectQuizCustomerLoading, shallowEqual);\n\n const [isShowExpired, setIsShowExpired] = useState(false);\n\n const {\n register,\n handleSubmit,\n reset,\n formState: { isSubmitting },\n watch,\n getValues,\n setValue,\n } = useForm({\n resolver: yupResolver(searchInputSchema),\n defaultValues: {\n keyword: '',\n },\n });\n\n const values = getValues();\n\n const onSearchKeywordSubmit = useCallback(\n (values: SearchFormData) => {\n dispatch(resetQuizCustomerPages());\n dispatch(setQuizCustomerActivePage(1));\n\n dispatch(\n getAllCustomerQuizzes({\n activePage: 1,\n activeSearchKeyword: values.keyword,\n isShowExpired: isShowExpired\n })\n );\n },\n [dispatch, isShowExpired]\n );\n\n const onSearchKeywordChange = debounce(useCallback(\n (e: ChangeEvent) => {\n e.preventDefault();\n\n setValue('keyword', e.target.value);\n\n dispatch(resetQuizCustomerPages());\n dispatch(setQuizCustomerActivePage(1));\n\n dispatch(\n getAllCustomerQuizzes({\n activePage: 1,\n activeSearchKeyword: e.target.value ?? '',\n isShowExpired: isShowExpired\n })\n );\n },\n [dispatch, isShowExpired]\n ), 300);\n\n const handleReset = useCallback(() => {\n reset();\n\n dispatch(\n getAllCustomerQuizzes({\n activePage: 1,\n activeSearchKeyword: '',\n isShowExpired: isShowExpired\n })\n );\n }, []);\n\n const handlePaginationChange = useCallback(\n (page: number) => {\n dispatch(setQuizCustomerActivePage(page));\n },\n [dispatch]\n );\n\n useEffect(() => {\n dispatch(\n getAllCustomerQuizzes({\n activePage,\n activeSearchKeyword: values.keyword ?? '',\n isShowExpired: isShowExpired\n })\n );\n\n }, [dispatch, activePage, isShowExpired]);\n\n useEffect(() => () => {\n dispatch(setQuizCustomerActivePage(1));\n }, [dispatch]);\n\n const handleToggleHideEnabled = () => {\n setIsShowExpired(!isShowExpired);\n };\n\n return (\n \n \n \n \n \n \n Show Expired Quizzes\n \n \n \n \n \n {quizzes.length > 0 && (\n \n \n \n Title\n \n Access\n \n Customer Name\n \n\n Customer Email\n \n Created Date\n \n Deadline\n Actions\n
\n \n )}\n \n {quizzes.length > 0 ? (\n quizzes.map((quiz) => )\n ) : (\n <>\n {!isLoading && (\n \n \n No list items\n | \n
\n )}\n >\n )}\n \n
\n\n {totalPages > 1 && (\n \n \n \n )}\n \n \n );\n};","// import './style.css';\n\nimport { Box, Flex, Spinner, Text, Tooltip } from '@chakra-ui/react';\nimport React, { useEffect, useState } from 'react';\nimport DatePicker from 'react-datepicker';\nimport moment from \"moment\";\nimport { format } from \"date-fns\";\nimport Icon from \"@/components/Icon\";\nimport { IconName } from \"@fortawesome/pro-solid-svg-icons\";\n\n\ntype Props = {\n icon: IconName;\n title: string;\n value: string | number;\n onChange?: (date: Date) => void;\n source?: string;\n loading?: boolean;\n startDate?: string | null;\n isDisabled?: boolean;\n};\n\nexport const roundToNearest30 = (date: Date) => {\n const minutes = 30;\n const ms = 1000 * 60 * minutes;\n return new Date(Math.ceil((date.getTime() + 60000) / ms) * ms);\n};\n\nexport const CustomerQuizHeaderCard = ({\n icon,\n title,\n value,\n onChange,\n source,\n loading,\n startDate,\n isDisabled\n}: Props) => {\n const [open, setOpen] = useState(false);\n const [dateValue, setDateValue] = useState('MM/DD/YYYY HH:MM');\n const [updateTime, setUpdateTime] = useState(false);\n\n const handleCalendarOpen = () => {\n setOpen(true);\n };\n\n const validateEndDateOnChange = (date: Date) => {\n const currentDate = new Date(startDate ? (moment(startDate).isAfter(new Date()) ? startDate : new Date()) : new Date());\n if (currentDate.getTime() < date.getTime()) {\n onChange && onChange(date);\n } else {\n setDateValue(format(roundToNearest30(currentDate), 'MM/dd/yyyy hh:mm a'));\n onChange && onChange(new Date(roundToNearest30(currentDate)));\n }\n };\n\n useEffect(() => {\n setDateValue(value.toString());\n }, [value]);\n\n useEffect(() => {\n if (updateTime) {\n setOpen(false);\n dateValue && validateEndDateOnChange(new Date(dateValue));\n setUpdateTime(false);\n }\n }, [updateTime]);\n\n return (\n \n \n \n \n \n \n \n {title}\n {title === 'Deadline' && (\n \n \n \n \n \n )}\n \n \n \n {title === 'Deadline' ? (\n \n {\n setDateValue(format(date, 'MM/dd/yyyy hh:mm a'));\n if (event == undefined || source === 'Result') {\n setUpdateTime(true);\n } else {\n setUpdateTime(false);\n }\n }}\n disabledKeyboardNavigation\n readOnly\n minDate={moment(startDate).isAfter(new Date()) ? new Date(startDate ?? new Date()) : new Date()}\n onCalendarOpen={handleCalendarOpen}\n onCalendarClose={() => alert('handle close called')}\n open={open}\n onClickOutside={() => setOpen(false)}\n popperPlacement=\"bottom\"\n />\n {loading ? (\n \n ) : (\n \n \n !isDisabled && setOpen((prevState) => !prevState)}\n />\n \n \n )}\n \n ) : (\n \n {value}\n \n )}\n \n );\n};\n","import React, { ChangeEvent, useCallback, useMemo, useState } from 'react';\nimport { useQuery } from \"react-query\";\nimport { Link, useNavigate, useParams } from \"react-router-dom\";\nimport {\n getCustomerResults,\n getQuizResultCSV, getUserQuizById,\n updateEndDate\n} from \"@/features/Quiz/api/getQuizzes\";\nimport { Box, Button, Flex, Select, Spinner, Table, Tbody, Td, Text, Thead, Tr } from \"@chakra-ui/react\";\nimport { ThEl } from \"@/features/Quiz/components/ArticlesQuiz\";\nimport { format } from \"date-fns\";\nimport Icon from \"@/components/Icon\";\nimport { useGetQuizzesList } from \"@/features/Classes/api\";\nimport { CustomerQuizHeaderCard } from \"@/features/Quiz/components/CustomerQuizHeaderCard\";\nimport { useNotificationStore } from \"@/stores/notifications\";\nimport {isNotNull} from \"@/utils/helpers\";\n\nexport const CustomerResults = () => {\n const { userQuizId } = useParams();\n const navigate = useNavigate();\n const { addNotification } = useNotificationStore();\n\n const [downloading, setDownloading] = useState(false);\n const [loading, setLoading] = useState(false);\n\n const { data: resultsData, isLoading: resultsIsLoading } = useQuery(['results', userQuizId],\n () => userQuizId ? getCustomerResults(userQuizId) : null, {\n useErrorBoundary: (error: any) => error.response\n }\n );\n\n const quizzesListData = useGetQuizzesList().data\n\n const showDownload = useMemo(() => resultsData?.assignList?.filter((user) => user.submitAt !== null), [resultsData?.assignList]);\n\n const handleLinkClick = useCallback(\n (e: ChangeEvent) => {\n e.preventDefault();\n if (e.target.value) {\n navigate(`/quiz/customer-quiz/results/${e.target.value}`)\n }\n },\n [navigate]\n );\n\n const handleDeadlineChange = useCallback(\n async (date: Date) => {\n try {\n setLoading(true);\n await updateEndDate(Number(userQuizId), {\n end_date: date ? date.toISOString() : null,\n });\n await getUserQuizById(Number(userQuizId))\n setLoading(false);\n addNotification({\n type: 'success',\n title: 'Deadline updated',\n });\n\n } catch (e: any) {\n setLoading(false);\n addNotification({\n type: 'error',\n title: 'Failed to update Deadline',\n });\n throw e;\n }\n },\n [userQuizId, addNotification]\n );\n\n const handleDownload = useCallback(\n async () => {\n setDownloading(true);\n try {\n if (userQuizId) {\n await getQuizResultCSV(userQuizId);\n }\n } catch (e: any) {\n setDownloading(false);\n throw e;\n }\n setDownloading(false);\n },\n [userQuizId]\n );\n\n return (\n <>\n \n \n \n\n \n }\n iconSize=\"14px 16px\"\n value={`${userQuizId ?? ''}`}\n onChange={handleLinkClick}\n className=\"quiz_select\">\n {[...(quizzesListData?.result || []), ...[resultsData]].filter(isNotNull).map((item) => (\n \n ))}\n \n \n \n \n \n \n \n \n \n user.submitAt !== null).length ?? '0'}\n />\n \n\n \n \n \n {\n resultsIsLoading ? :\n resultsData?.assignList && resultsData.assignList.length > 0 ?\n \n \n \n \n Student email\n \n \n Score\n \n Percentage\n Date Submitted\n Actions\n
\n \n \n {resultsData?.assignList?.map((item) => {\n return \n {item.user.email} | \n {item.submitAt && item.progress !== null\n ? `${Math.round((Number(resultsData.countOfQuestions) * Number(item.progress)) / 100)}/${resultsData.countOfQuestions}`\n : '-'} | \n {item.progress ? {item.progress}% | : - | }\n {item.submitAt ? format(new Date(item.submitAt), 'MM/dd/yyyy hh:mm a') : '-'} | \n {item.submitAt && (\n \n )} | \n\n
\n })}\n \n
\n :\n \n Distribute Quiz before viewing results\n \n }\n >\n )\n}\n","import { modelShaper } from '@/utils/helpers';\nimport React from 'react';\nimport { useQuery } from 'react-query';\nimport { getCustomerUserResults } from '@/features/Quiz/api/getQuizzes';\nimport { Box, Flex, Text, Button, Spinner } from '@chakra-ui/react';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport { format } from 'date-fns';\nimport Icon from '@/components/Icon';\n\nexport const CustomerUserResults = () => {\n const { assignId } = useParams();\n const navigate = useNavigate();\n\n const { data: userResultsData, isLoading: resultsIsLoading } = useQuery(\n ['user-results', assignId],\n () => (assignId ? getCustomerUserResults(assignId) : null),\n {\n useErrorBoundary: (error: any) => error.response?.status >= 400,\n }\n );\n\n const shapedData = modelShaper(userResultsData?.questions || []);\n\n if (resultsIsLoading) return ;\n\n return (\n <>\n \n \n \n \n \n \n \n \n {userResultsData?.title ?? ''}\n \n \n \n Date Completed\n \n {userResultsData?.dateSubmitted ? format(new Date(userResultsData.dateSubmitted), 'MMMM do, yyyy') : '-'}\n \n \n \n Score\n \n {userResultsData && userResultsData?.dateSubmitted && userResultsData?.score !== null\n ? `${userResultsData?.score}%`\n : '-'}\n \n \n \n Correct Answers\n \n {userResultsData?.rightAnswers}\n \n \n \n \n\n {shapedData.map((question, key) => (\n \n \n Question {question.questionOrder}\n \n \n {userResultsData?.isGraded ? (\n \n \n \n {question?.isCorrectAnswer ? 'Correct' : 'Incorrect'}\n \n \n ) : (\n <>\n {!question?.isCorrectAnswer && (\n \n \n \n \n \n {question?.userIndexAnswer}\n {'. '}\n \n \n \n Your Answer\n \n \n \n \n )}\n \n \n \n \n \n {question?.correctIndexAnswer}\n {'. '}\n\n \n \n \n Correct Answer\n \n \n \n \n >\n )}\n \n ))}\n \n \n >\n );\n};\n","import { MyQuiz } from '@/features/Quiz/components/MyQuiz';\nimport { SharedQuiz } from '@/features/Quiz/components/SharedQuiz';\nimport React, { Suspense, useEffect, useState } from 'react';\nimport { Navigate, Outlet, useLocation, useNavigate, useRoutes } from 'react-router-dom';\nimport { CreateQuiz } from '@/features/Quiz/components/CreateQuiz';\nimport { EditQuiz } from '@/features/Quiz/components/EditQuiz';\nimport { ViewQuiz } from '@/features/Quiz/components/ViewQuiz';\nimport { Box, Spinner, Tab, TabList, TabPanels, Tabs, useMediaQuery } from '@chakra-ui/react';\nimport { ArticlesQuiz } from '@/features/Quiz/components/ArticlesQuiz';\nimport { QuizLibrary } from '@/features/Quiz/components/QuizLibrary';\nimport { AdminQuiz } from '@/features/Quiz/components/AdminQuiz';\nimport { useAuth } from '@/context/AuthContext';\nimport { CustomerQuiz } from '@/features/Quiz/components/CustomerQuiz';\nimport { CustomerResults } from '@/features/Quiz/components/CustomerResults';\nimport { CustomerUserResults } from '@/features/Quiz/components/CustomerUserResults';\n\nexport const QuizRoutes = () => {\n const element = useRoutes([...quizRoutes]);\n\n return <>{element}>;\n};\n\nconst Quizzes = () => {\n const { pathname } = useLocation();\n const navigate = useNavigate();\n\n const { user } = useAuth();\n\n const [tabIndex, setTabIndex] = useState(0);\n const [isSmThan900] = useMediaQuery(['(max-width: 900px)']);\n\n const isSuperAdmin = user?.roles.includes('ROLE_SUPER_ADMIN');\n const isArticleQuiz = !isSuperAdmin && (pathname === '/quiz' || pathname === '/quiz/');\n\n useEffect(() => {\n if (!pathname) return setTabIndex(0);\n\n if (pathname.includes('/quiz/library')) {\n setTabIndex(isSuperAdmin ? 1 : 0);\n } else if (pathname.includes('/quiz/admin-quiz') || pathname.includes('/quiz/my-quiz')) {\n setTabIndex(isSuperAdmin ? 2 : 0);\n } else if (pathname.includes('/quiz/shared-quiz')) {\n setTabIndex(isSuperAdmin ? 3 : 1);\n } else if (pathname.includes('/quiz/customer-quiz')) {\n setTabIndex(isSuperAdmin ? 4 : 1);\n } else return setTabIndex(0);\n }, [pathname]);\n\n if (isArticleQuiz && pathname.includes('/quiz/library')) {\n return ;\n }\n if (!isSuperAdmin && pathname === '/quiz') {\n return ;\n }\n if (!isSuperAdmin && !pathname.includes('my-quiz') && !pathname.includes('shared-quiz')) {\n return ;\n }\n\n return (\n \n \n {!pathname.includes('/quiz/user-quiz') ? (\n isSuperAdmin ? (\n \n navigate('')}>Articles Quiz Template\n navigate('library')}>Quiz Library\n navigate('admin-quiz')}>Admin Quizzes\n navigate('shared-quiz')}>Shared By Admins\n navigate('customer-quiz')}>Customer Quizzes\n \n ) : (\n \n navigate('my-quiz')}>My Quizzes\n navigate('shared-quiz')}>Shared By Me\n \n )\n ) : null}\n \n \n \n \n }>\n \n \n \n \n \n );\n};\n\nconst quizRoutes = [\n {\n path: '/',\n element: ,\n children: [\n { path: 'admin-quiz/create', element: },\n { path: 'admin-quiz/copy/:adminQuizId', element: },\n { path: 'admin-quiz/view/:adminQuizId', element: },\n { path: 'admin-quiz/edit/:adminQuizId', element: },\n { path: 'admin-quiz', element: },\n\n { path: 'shared-quiz/copy/:adminQuizId', element: },\n { path: 'shared-quiz/view/:adminQuizId', element: },\n { path: 'shared-quiz/edit/:adminQuizId', element: },\n { path: 'shared-quiz', element: },\n\n { path: 'customer-quiz', element: },\n { path: 'customer-quiz/view/:userQuizId', element: },\n { path: 'customer-quiz/edit/:userQuizId', element: },\n { path: 'customer-quiz/copy/:userQuizId', element: },\n { path: 'customer-quiz/results/:userQuizId', element: },\n { path: 'customer-quiz/user-results/:assignId', element: },\n\n { path: 'my-quiz/view/:userQuizId', element: },\n { path: 'my-quiz/edit/:userQuizId', element: },\n { path: 'my-quiz/create', element: },\n { path: 'my-quiz/copy/:userQuizId', element: },\n { path: 'my-quiz', element: },\n\n { path: 'library/create', element: },\n { path: 'library/copy/:quizLibraryId', element: },\n { path: 'library/view/:quizLibraryId', element: },\n { path: 'library/edit/:quizLibraryId', element: },\n { path: 'library', element: },\n\n { path: 'user-quiz/edit/:userQuizId', element: },\n { path: 'user-quiz/view/:userQuizId', element: },\n\n { path: 'create/:articleId', element: },\n { path: 'create', element: },\n { path: 'copy/:quizId', element: },\n { path: 'view/:id', element: },\n { path: 'edit/:quizId', element: },\n { path: '/', element: },\n { path: '*', element: },\n ],\n },\n];\n","import React from 'react';\nimport {Flex} from '@chakra-ui/react';\n\ninterface Props {\n isActive?: boolean,\n isChevron?: boolean,\n onPaginationClick: () => void;\n children: React.ReactChild\n}\n\nexport const PaginationButton = ({children, isActive, isChevron, onPaginationClick}: Props) => {\n return (\n \n {children}\n \n );\n};\n","import React from 'react';\nimport {HStack, Box} from '@chakra-ui/react';\nimport {PaginationButton} from '@/components/Pagination/PaginationButton';\nimport Icon from '@/components/Icon';\n\ninterface Props {\n totalPages: number,\n currentPage: number,\n handlePagination: (page: number) => void;\n}\n\nexport const Pagination = ({currentPage, handlePagination, totalPages}: Props) => {\n return (\n \n {currentPage > 1 &&\n <>\n currentPage !== 1 && handlePagination(currentPage - 1)}\n >\n \n \n\n >\n }\n {currentPage > 2 &&\n <>\n handlePagination(1)}\n >1\n {totalPages > 3 &&\n ...\n }\n >\n }\n {currentPage > 1 &&\n currentPage !== 1 && handlePagination(currentPage - 1)}\n >{currentPage - 1}\n }\n {\n }}>{currentPage}\n {currentPage < totalPages &&\n currentPage !== totalPages && handlePagination(currentPage + 1)}\n >{currentPage + 1}\n }\n {currentPage <= totalPages - 2 &&\n <>\n {totalPages > 3 &&\n ...\n }\n handlePagination(totalPages)}\n >{totalPages}\n >\n }\n {currentPage < totalPages &&\n currentPage < totalPages && handlePagination(currentPage + 1)}\n >\n \n \n }\n \n );\n};\n","import { createAsyncThunk, createEntityAdapter, createSelector, createSlice } from '@reduxjs/toolkit';\nimport { RootState } from '../../store';\nimport {\n buildQuizzesParams,\n createQuiz,\n getQuiz,\n postQuizzes,\n removeTemplateQuiz,\n updateQuiz,\n} from '@/features/Quiz/api/getQuizzes';\nimport {CreateQuizData, Quiz, QuizzesResponse, SaveQuizError, UpdateQuizData} from '@/features/Quiz/types';\nimport { PayloadAction } from '@reduxjs/toolkit/dist/createAction';\nimport {isNotNull} from \"@/utils/helpers\";\n\nexport type QuizType = Quiz;\n\nexport const getAllQuizzes = createAsyncThunk<\n QuizzesResponse,\n {\n activePage: number;\n activeSearchKeyword: string | number;\n withAssign?: boolean;\n itemsOnPage?: number;\n },\n {\n rejectValue: string;\n }\n>('quizzes/quiz/getAllQuizzes', async ({ activePage, activeSearchKeyword, withAssign, itemsOnPage = 20 }) => {\n const data = buildQuizzesParams(activePage, activeSearchKeyword, withAssign, itemsOnPage);\n return await postQuizzes(data);\n});\n\nexport const deleteTemplateQuiz = createAsyncThunk('quizzes/quiz/deleteTemplateQuiz', (id: number) => removeTemplateQuiz(id));\n\nexport const getQuizById = createAsyncThunk('quizzes/quiz/getQuizById', (id: number) => getQuiz(id));\n\nexport const createNewQuiz = createAsyncThunk<\n Quiz,\n CreateQuizData,\n {\n rejectValue: SaveQuizError;\n }\n>('quizzes/quiz/createNewQuiz', async (data, { rejectWithValue }): Promise => {\n return await createQuiz(data).catch((res) => rejectWithValue(res));\n});\n\nexport const editQuiz = createAsyncThunk<\n Quiz,\n {\n id: number;\n data: UpdateQuizData;\n },\n {\n rejectValue: SaveQuizError;\n }\n>('quizzes/quiz/editQuiz', async ({ id, data }, { rejectWithValue }): Promise => {\n return await updateQuiz(id, data).catch((res) => rejectWithValue(res));\n});\n\nconst quizAdapter = createEntityAdapter();\n\ntype State = {\n pages: Record;\n activePage: number;\n total: number;\n totalPages: number;\n isLoading: boolean;\n};\n\nconst quizSlice = createSlice({\n name: 'quiz',\n initialState: quizAdapter.getInitialState({\n pages: {},\n activePage: 1,\n totalPages: 1,\n total: 0,\n isLoading: false,\n }),\n reducers: {\n setQuizActivePage: (state, action: PayloadAction) => {\n state.activePage = action.payload;\n },\n resetQuizPages: (state) => {\n state.pages = {};\n },\n },\n extraReducers: (builder) => {\n builder.addCase(getAllQuizzes.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(getAllQuizzes.fulfilled, (state, action) => {\n quizAdapter.upsertMany(state, action.payload.result);\n state.pages[action.meta.arg.activePage] = action.payload.result.map((item) => item.id);\n state.total = action.payload.navigation.total_items;\n state.activePage = action.payload.navigation.page;\n state.totalPages = action.payload.navigation.total_pages;\n state.isLoading = false;\n });\n builder.addCase(getAllQuizzes.rejected, (state) => {\n state.isLoading = false;\n });\n\n builder.addCase(deleteTemplateQuiz.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(deleteTemplateQuiz.fulfilled, (state, action) => {\n quizAdapter.removeOne(state, action.meta.arg);\n state.isLoading = false;\n });\n builder.addCase(deleteTemplateQuiz.rejected, (state) => {\n state.isLoading = false;\n });\n\n builder.addCase(getQuizById.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(getQuizById.fulfilled, (state, action) => {\n quizAdapter.upsertOne(state, action.payload as Quiz);\n state.isLoading = false;\n });\n builder.addCase(getQuizById.rejected, (state) => {\n state.isLoading = false;\n });\n\n builder.addCase(createNewQuiz.fulfilled, (state, action) => {\n quizAdapter.upsertOne(state, action.payload);\n });\n\n builder.addCase(editQuiz.fulfilled, (state, action) => {\n quizAdapter.upsertOne(state, action.payload);\n });\n },\n});\n\nexport const quiz = quizSlice.reducer;\nexport const { resetQuizPages, setQuizActivePage } = quizSlice.actions;\n\nconst selectState = (state: RootState) => state.quizzes.quiz;\n\nexport const { selectById, selectIds } = quizAdapter.getSelectors(selectState);\n\nconst selectRootState = (state: RootState) => state;\n\nexport const selectQuizById = createSelector(\n [(state: RootState, id: number | null) => (id ? selectById(state, id) ?? null : null)],\n (entity) => entity\n);\n\nconst selectIdsByPage = createSelector([selectState, (_: RootState, page: number) => page], (state, page) => state.pages[page] ?? []);\n\nexport const selectQuizByPage = createSelector([selectRootState, (state: RootState, page: number) => selectIdsByPage(state, page)], (state, ids) =>\n ids.map((id) => selectQuizById(state, id)).filter(isNotNull)\n);\n\nexport const selectAllQuizzes = createSelector([selectIds, selectRootState], (ids, state) =>\n ids.map((id) => selectQuizById(state, Number(id))).filter(isNotNull)\n);\n\nexport const selectQuizActivePage = createSelector([selectState], (state) => state.activePage);\nexport const selectQuizTotalPages = createSelector([selectState], (state) => state.totalPages);\nexport const selectQuizTotal = createSelector([selectState], (state) => state.total);\nexport const selectQuizLoading = createSelector([selectState], (state) => state.isLoading);\n","import { createAsyncThunk, createEntityAdapter, createSelector, createSlice } from '@reduxjs/toolkit';\nimport { isNotNull } from '@/utils/helpers';\nimport { RootState } from '../../store';\nimport {\n createQuizLibrary,\n getQuizLibrary,\n getQuizLibraryById,\n removeQuizLibraryById,\n updateQuizLibrary\n} from '@/features/Quiz/api/getQuizzes';\nimport {\n CreateQuizLibraryData,\n QuizLibrary,\n QuizLibraryResponse, SaveQuizError,\n UpdateQuizLibraryData,\n} from '@/features/Quiz/types';\nimport { PayloadAction } from '@reduxjs/toolkit/dist/createAction';\n\nexport type QuizLibraryType = QuizLibrary;\n\nexport const buildQuizLibraryParams = (\n activePage: number,\n activeSearchKeyword?: string | number,\n isTextbook?: boolean,\n) => {\n return {\n navigation: {\n page: activePage,\n itemsOnPage: 20\n },\n totalCount: true,\n filter: {\n collection: [\n ...(activeSearchKeyword ? [\n {\n bool_operator: 'and',\n condition: {\n property: 'title',\n operator: 'contains',\n value: activeSearchKeyword ?? 0\n }\n },\n ] : []\n ),\n ...(isTextbook ? [\n {\n bool_operator: 'and',\n condition: {\n property: 'section_id',\n operator: 'is_null',\n }\n }\n ] : [\n {\n bool_operator: 'and',\n condition: {\n property: 'section_id',\n operator: 'is_not_null',\n }\n }\n ]\n ),\n ]\n },\n sort: [\n [\n 'title',\n 'asc'\n ]\n ]\n }\n}\n\nexport const getAllQuizzesLibrary = createAsyncThunk<\n QuizLibraryResponse,\n {\n activePage: number;\n activeSearchKeyword?: string | number;\n isTextbook?: boolean;\n },\n {\n rejectValue: string;\n }\n>(\n'quizzes/getAllQuizzesLibrary',\nasync ({ activePage, activeSearchKeyword, isTextbook }) => {\n const data = buildQuizLibraryParams(activePage, activeSearchKeyword, isTextbook);\n\n return await getQuizLibrary(data);\n});\n\nexport const getLibraryQuizById = createAsyncThunk('quizzes/getQuizLibraryById', (id: number) => getQuizLibraryById(id));\n\nexport const removeQuizLibrary = createAsyncThunk(\n'quizzes/removeQuizLibrary',\n(id: number) => removeQuizLibraryById(id)\n);\n\n\nexport const createNewQuizLibrary = createAsyncThunk<\n QuizLibrary,\n CreateQuizLibraryData,\n {\n rejectValue: SaveQuizError;\n }\n >('quizzes/createNewQuizLibrary', async (data, { rejectWithValue }) => {\n return await createQuizLibrary(data).catch((res) => rejectWithValue(res));\n});\n\nexport const editQuizLibrary = createAsyncThunk<\n QuizLibrary,\n {\n id: number;\n data: UpdateQuizLibraryData;\n },\n {\n rejectValue: SaveQuizError;\n }\n >('quizzes/editQuizLibrary', async ({ id, data }, { rejectWithValue }) => {\n return await updateQuizLibrary(id, data).catch((res) => rejectWithValue(res));\n});\n\nconst quizLibraryAdapter = createEntityAdapter();\n\ntype State = {\n pages: Record;\n activePage: number;\n total: number;\n totalPages: number;\n isLoading: boolean;\n};\n\nconst quizLibrarySlice = createSlice({\n name: 'quizLibrary',\n initialState: quizLibraryAdapter.getInitialState({\n pages: {},\n activePage: 1,\n totalPages: 1,\n total: 0,\n isLoading: false,\n }),\n reducers: {\n setQuizLibraryActivePage: (state, action: PayloadAction) => {\n state.activePage = action.payload;\n },\n resetQuizLibraryPages: (state) => {\n state.pages = {};\n },\n },\n extraReducers: (builder) => {\n builder.addCase(getAllQuizzesLibrary.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(getAllQuizzesLibrary.fulfilled, (state, action) => {\n quizLibraryAdapter.upsertMany(state, action.payload.result);\n state.pages[action.payload.navigation.page ?? 1] = action.payload.result.map((item) => item.id);\n state.total = action.payload.navigation.total_items;\n state.activePage = action.payload.navigation.page;\n state.totalPages = action.payload.navigation.total_pages;\n state.isLoading = false;\n });\n builder.addCase(getAllQuizzesLibrary.rejected, (state) => {\n state.isLoading = false;\n });\n builder.addCase(getLibraryQuizById.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(getLibraryQuizById.fulfilled, (state, action) => {\n quizLibraryAdapter.upsertOne(state, action.payload);\n state.isLoading = false;\n });\n builder.addCase(getLibraryQuizById.rejected, (state) => {\n state.isLoading = false;\n });\n builder.addCase(removeQuizLibrary.fulfilled, (state, action) => {\n quizLibraryAdapter.removeOne(state, action.meta.arg);\n });\n builder.addCase(createNewQuizLibrary.fulfilled, (state, action) => {\n quizLibraryAdapter.upsertOne(state, action.payload);\n });\n\n builder.addCase(editQuizLibrary.fulfilled, (state, action) => {\n quizLibraryAdapter.upsertOne(state, action.payload);\n });\n },\n});\n\nexport const quizLibrary = quizLibrarySlice.reducer;\nexport const { resetQuizLibraryPages, setQuizLibraryActivePage } = quizLibrarySlice.actions;\n\nconst selectState = (state: RootState) => state.quizzes.quizLibrary;\n\nexport const { selectById, selectIds } = quizLibraryAdapter.getSelectors(selectState);\n\nconst selectRootState = (state: RootState) => state;\n\nexport const selectQuizLibraryById = createSelector(\n [(state: RootState, id: number | null) => (id ? selectById(state, id) ?? null : null)],\n (entity) => entity\n);\n\nconst selectIdsByPage = createSelector(\n [selectState, (_: RootState, page: number) => page],\n (state, page) => state.pages[page] ?? []\n);\n\nexport const selectQuizLibraryPage = createSelector(\n [selectRootState, (state: RootState, page: number) => selectIdsByPage(state, page)],\n (state, ids) => ids.map((id) => selectQuizLibraryById(state, id)).filter(isNotNull)\n);\n\nexport const selectQuizLibraryActivePage = createSelector([selectState], (state) => state.activePage);\nexport const selectQuizLibraryTotalPages = createSelector([selectState], (state) => state.totalPages);\nexport const selectQuizLibraryTotal = createSelector([selectState], (state) => state.total);\nexport const selectQuizLibraryLoading = createSelector([selectState], (state) => state.isLoading);\n","import { createAsyncThunk, createEntityAdapter, createSelector, createSlice } from '@reduxjs/toolkit';\nimport { isNotNull } from '@/utils/helpers';\nimport { RootState } from '../../store';\nimport {\n createAdminQuiz,\n deleteAdminQuizById,\n getAdminQuizById,\n getAdminQuizzes,\n updateAdminQuiz, updateUserQuiz,\n} from '@/features/Quiz/api/getQuizzes';\nimport {\n CreateQuizLibraryData,\n QuizLibrary,\n QuizLibraryResponse, SaveQuizError,\n UpdateQuizLibraryData,\n} from '@/features/Quiz/types';\nimport { PayloadAction } from '@reduxjs/toolkit/dist/createAction';\n\nexport type QuizAdminType = QuizLibrary;\n\nexport const buildQuizLibraryParams = (activePage: number, activeSearchKeyword?: string | number) => {\n return {\n navigation: {\n page: activePage,\n itemsOnPage: 20\n },\n totalCount: true,\n filter: {\n collection: [\n ...(activeSearchKeyword ? [\n {\n bool_operator: 'and',\n condition: {\n property: 'title',\n operator: 'contains',\n value: activeSearchKeyword ?? 0\n }\n }\n ] : []\n ),\n ]\n },\n sort: [\n [\n 'title',\n 'asc'\n ]\n ]\n }\n}\n\nexport const getAllQuizzesAdmin = createAsyncThunk<\n QuizLibraryResponse,\n {\n activePage: number;\n activeSearchKeyword?: string | number;\n },\n {\n rejectValue: string;\n }\n>(\n'quizzes/getAllQuizzesAdmin',\nasync ({activePage, activeSearchKeyword}) => {\n const data = buildQuizLibraryParams(activePage, activeSearchKeyword);\n\n return await getAdminQuizzes(data);\n});\n\nexport const getQuizAdminById = createAsyncThunk(\n'quizzes/getQuizAdminById',\n(id: number) => getAdminQuizById(id)\n);\n\nexport const removeQuizAdmin = createAsyncThunk(\n'quizzes/removeQuizAdmin',\n(id: number) => deleteAdminQuizById(id)\n);\n\n\nexport const createQuizAdmin = createAsyncThunk<\n QuizLibrary,\n CreateQuizLibraryData,\n {\n rejectValue: SaveQuizError;\n }\n>(\n 'quizzes/createQuizAdmin',\nasync (data, { rejectWithValue }) => {\n return await createAdminQuiz(data).catch((res) => rejectWithValue(res));\n}\n);\n\nexport const editQuizAdmin = createAsyncThunk<\n QuizLibrary,\n {\n id: number;\n data: UpdateQuizLibraryData;\n },\n {\n rejectValue: SaveQuizError;\n }\n >('quizzes/editQuizAdmin', async ({ id, data }, { rejectWithValue }) => {\n return await updateAdminQuiz(id, data).catch((res) => rejectWithValue(res));\n});\n\nexport const editUserQuiz = createAsyncThunk<\n QuizLibrary,\n {\n id: number;\n data: UpdateQuizLibraryData;\n },\n {\n rejectValue: SaveQuizError;\n }\n>('quizzes/editUserQuiz', async ({ id, data }, { rejectWithValue }) => {\n return await updateUserQuiz(id, data).catch((res) => rejectWithValue(res));\n});\n\nconst quizAdminAdapter = createEntityAdapter();\n\ntype State = {\n pages: Record;\n activePage: number;\n total: number;\n totalPages: number;\n isLoading: boolean;\n};\n\nconst quizAdminSlice = createSlice({\n name: 'quizAdmin',\n initialState: quizAdminAdapter.getInitialState({\n pages: {},\n activePage: 1,\n totalPages: 1,\n total: 0,\n isLoading: false,\n }),\n reducers: {\n setQuizAdminActivePage: (state, action: PayloadAction) => {\n state.activePage = action.payload;\n },\n resetQuizAdminPages: (state) => {\n state.pages = {};\n },\n },\n extraReducers: (builder) => {\n builder.addCase(getAllQuizzesAdmin.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(getAllQuizzesAdmin.fulfilled, (state, action) => {\n quizAdminAdapter.upsertMany(state, action.payload.result);\n state.pages[action.payload.navigation.page ?? 1] = action.payload.result.map((item) => item.id);\n state.total = action.payload.navigation.total_items;\n state.activePage = action.payload.navigation.page;\n state.totalPages = action.payload.navigation.total_pages;\n state.isLoading = false;\n });\n builder.addCase(getAllQuizzesAdmin.rejected, (state) => {\n state.isLoading = false;\n });\n builder.addCase(getQuizAdminById.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(getQuizAdminById.fulfilled, (state, action) => {\n quizAdminAdapter.upsertOne(state, action.payload);\n state.isLoading = false;\n });\n builder.addCase(getQuizAdminById.rejected, (state) => {\n state.isLoading = false;\n });\n builder.addCase(removeQuizAdmin.fulfilled, (state, action) => {\n quizAdminAdapter.removeOne(state, action.meta.arg);\n });\n builder.addCase(createQuizAdmin.fulfilled, (state, action) => {\n quizAdminAdapter.upsertOne(state, action.payload);\n });\n\n builder.addCase(editQuizAdmin.fulfilled, (state, action) => {\n quizAdminAdapter.upsertOne(state, action.payload);\n });\n\n builder.addCase(editUserQuiz.fulfilled, (state, action) => {\n quizAdminAdapter.upsertOne(state, action.payload);\n });\n },\n});\n\nexport const quizAdmin = quizAdminSlice.reducer;\nexport const { resetQuizAdminPages, setQuizAdminActivePage } = quizAdminSlice.actions;\n\nconst selectState = (state: RootState) => state.quizzes.quizAdmin;\n\nexport const { selectById, selectIds } = quizAdminAdapter.getSelectors(selectState);\n\nconst selectRootState = (state: RootState) => state;\n\nexport const selectQuizAdminById = createSelector(\n [(state: RootState, id: number | null) => (id ? selectById(state, id) ?? null : null)],\n (entity) => entity\n);\n\nconst selectIdsByPage = createSelector(\n [selectState, (_: RootState, page: number) => page],\n (state, page) => state.pages[page] ?? []\n);\n\nexport const selectQuizAdminPage = createSelector(\n [selectRootState, (state: RootState, page: number) => selectIdsByPage(state, page)],\n (state, ids) => ids.map((id) => selectQuizAdminById(state, id)).filter(isNotNull)\n);\n\nexport const selectQuizAdminActivePage = createSelector([selectState], (state) => state.activePage);\nexport const selectQuizAdminTotalPages = createSelector([selectState], (state) => state.totalPages);\nexport const selectQuizAdminTotal = createSelector([selectState], (state) => state.total);\nexport const selectQuizAdminLoading = createSelector([selectState], (state) => state.isLoading);\n","import { createAsyncThunk, createEntityAdapter, createSelector, createSlice } from '@reduxjs/toolkit';\nimport { RootState } from '../../store';\n\nimport { PayloadAction } from '@reduxjs/toolkit/dist/createAction';\nimport { createAdminQuiz, deleteQuiz, getAdminQuizById, updateUserQuiz } from '@/features/Quiz/api/getQuizzes';\nimport { CreateQuizLibraryData, QuizLibrary, QuizLibraryResponse, SaveQuizError, UpdateQuizLibraryData } from '@/features/Quiz';\nimport { isNotNull } from '@/utils/helpers';\nimport { axios } from '@/lib/axios';\nimport { API_URL } from '@/config';\nimport { format } from 'date-fns';\n\ntype FilterCollection = {\n bool_operator?: string;\n condition?: {\n property: string;\n operator: string;\n value: string | number | boolean;\n };\n};\n\ntype GetListBodyStructure = {\n navigation: {\n page: number;\n itemsOnPage: number;\n };\n totalCount: boolean;\n filter: {\n collection: FilterCollection[] | null;\n };\n sort: string[][];\n};\n\nexport type GetListParams = {\n activePage: number;\n activeSortProperty: string;\n activeSortDirection: string;\n activeSearchKeyword: string | number;\n isShowExpired: boolean;\n isNumber?: boolean;\n isApproved?: boolean;\n itemsOnPage?: number;\n};\n\nexport const getCustomerQuizzes = (data: GetListBodyStructure): Promise => {\n return axios.post(`${API_URL}/api/admin/quiz/list`, data);\n};\n\nexport const buildQuizLibraryParams = (activePage: number, activeSearchKeyword: string | number, isShowExpired: boolean) => {\n return {\n navigation: {\n page: activePage,\n itemsOnPage: 20,\n },\n totalCount: true,\n filter: {\n collection: [\n ...(!isShowExpired\n ? [\n {\n bool_operator: 'and',\n condition: {\n property: 'end_date',\n operator: 'greater_than',\n value: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),\n },\n },\n {\n bool_operator: 'or',\n condition: {\n property: 'end_date',\n operator: 'is_null',\n value: true,\n },\n },\n ]\n : []),\n {\n bool_operator: 'and',\n collection: [\n ...(activeSearchKeyword\n ? [\n {\n bool_operator: 'or',\n condition: {\n property: 'user_first_name',\n operator: 'contains',\n value: activeSearchKeyword ?? 0,\n },\n },\n ]\n : []),\n ...(activeSearchKeyword\n ? [\n {\n bool_operator: 'or',\n condition: {\n property: 'user_last_name',\n operator: 'contains',\n value: activeSearchKeyword ?? 0,\n },\n },\n ]\n : []),\n ...(activeSearchKeyword\n ? [\n {\n bool_operator: 'or',\n condition: {\n property: 'user_email',\n operator: 'contains',\n value: activeSearchKeyword ?? 0,\n },\n },\n ]\n : []),\n ...(activeSearchKeyword\n ? [\n {\n bool_operator: 'or',\n condition: {\n property: 'title',\n operator: 'contains',\n value: activeSearchKeyword ?? 0,\n },\n },\n ]\n : []),\n ],\n },\n ],\n },\n sort: [['start_date', 'desc']],\n };\n};\n\nexport const getAllCustomerQuizzes = createAsyncThunk<\n QuizLibraryResponse,\n {\n activePage: number;\n activeSearchKeyword: string | number;\n isShowExpired: boolean;\n },\n {\n rejectValue: string;\n }\n>('quizzes/getAllCustomerQuizzes', async ({ activePage, activeSearchKeyword, isShowExpired }) => {\n const data = buildQuizLibraryParams(activePage, activeSearchKeyword, isShowExpired);\n\n return await getCustomerQuizzes(data);\n});\n\nexport const getQuizCustomerById = createAsyncThunk('quizzes/getQuizCustomerById', (id: number) => getAdminQuizById(id));\n\nexport const removeQuizCustomer = createAsyncThunk('quizzes/removeQuizCustomer', (id: number) => deleteQuiz(id));\n\nexport const createQuizCustomer = createAsyncThunk<\n QuizLibrary,\n CreateQuizLibraryData,\n {\n rejectValue: SaveQuizError;\n }\n>('quizzes/createQuizCustomer', async (data, { rejectWithValue }) => {\n return await createAdminQuiz(data).catch((res) => rejectWithValue(res));\n});\n\nexport const editQuizCustomer = createAsyncThunk<\n QuizLibrary,\n {\n id: number;\n data: UpdateQuizLibraryData;\n },\n {\n rejectValue: SaveQuizError;\n }\n>('quizzes/editUserQuiz', async ({ id, data }, { rejectWithValue }) => {\n return await updateUserQuiz(id, data).catch((res) => rejectWithValue(res));\n});\n\nconst quizCustomerAdapter = createEntityAdapter