UNPKG

@tekdi/sunbird-quml-player

Version:

The QuML player library components are powered by Angular. This player is primarily designed to be used on Sunbird consumption platforms (mobile app, web portal, offline desktop app) to drive reusability and maintainability, hence reducing the redundant d

152 lines (151 loc) 5.82 kB
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core'; import { ErrorService } from '@project-sunbird/sunbird-player-sdk-v9'; import { CarouselComponent } from 'ngx-bootstrap/carousel'; import { Subject } from 'rxjs'; import { QumlPlayerConfig, IParentConfig, IAttempts } from '../quml-library-interface'; import { ViewerService } from '../services/viewer-service/viewer-service'; import { UtilService } from '../util-service'; import * as i0 from "@angular/core"; export declare class SectionPlayerComponent implements OnChanges, AfterViewInit { viewerService: ViewerService; utilService: UtilService; private cdRef; errorService: ErrorService; sectionConfig: QumlPlayerConfig; attempts: IAttempts; jumpToQuestion: any; mainProgressBar: any; sectionIndex: number; parentConfig: IParentConfig; playerEvent: EventEmitter<any>; sectionEnd: EventEmitter<any>; showScoreBoard: EventEmitter<any>; myCarousel: CarouselComponent; imageModal: ElementRef; questionSlide: ElementRef; destroy$: Subject<boolean>; loadView: boolean; showContentError: boolean; noOfTimesApiCalled: number; currentSlideIndex: number; showStartPage: boolean; threshold: number; questions: any[]; questionIds: string[]; noOfQuestions: number; initialTime: number; timeLimit: any; warningTime: number; showWarningTimer: boolean; showTimer: any; showFeedBack: boolean; showUserSolution: boolean; startPageInstruction: string; maxScore: number; points: number; initializeTimer: boolean; linearNavigation: boolean; showHints: any; allowSkip: boolean; progressBarClass: any[]; currentQuestionsMedia: any; disableNext: boolean; endPageReached: boolean; tryAgainClicked: boolean; currentOptionSelected: any; carouselConfig: { NEXT: number; PREV: number; }; active: boolean; showAlert: boolean; currentOptions: any; currentQuestion: any; currentQuestionIndetifier: string; media: any; currentSolutions: any; showSolution: any; optionSelectedObj: any; intervalRef: any; alertType: string; infoPopup: boolean; stopAutoNavigation: boolean; jumpSlideIndex: any; showQuestions: boolean; showZoomModal: boolean; zoomImgSrc: string; imageZoomCount: number; showRootInstruction: boolean; slideDuration: number; initialSlideDuration: number; disabledHandle: any; isAssessEventRaised: boolean; isShuffleQuestions: boolean; shuffleOptions: boolean; playerContentCompatibiltyLevel: number; constructor(viewerService: ViewerService, utilService: UtilService, cdRef: ChangeDetectorRef, errorService: ErrorService); ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; private subscribeToEvents; private setConfig; removeAttribute(): void; sortQuestions(): void; createSummaryObj(): { skipped: any; correct: any; wrong: any; partial: any; }; nextSlide(): void; prevSlide(): void; getQuestion(): void; resetQuestionState(): void; activeSlideChange(event: any): void; nextSlideClicked(event: any): void; previousSlideClicked(event: any): void; updateScoreForShuffledQuestion(): void; getCurrentSectionIndex(): number; goToSlideClicked(event: any, index: any): void; onEnter(event: any, index: any): void; jumpToSection(identifier: string): void; onSectionEnter(event: any, identifier: string): void; onScoreBoardClicked(): void; onScoreBoardEnter(event: KeyboardEvent): void; focusOnNextButton(): void; getOptionSelected(optionSelected: any): void; durationEnds(): void; private checkCompatibilityLevel; checkContentCompatibility(currentCompatibilityLevel: number): { error: Error; isCompitable: boolean; }; emitSectionEnd(isDurationEnded?: boolean, jumpToSection?: string): void; closeAlertBox(event: any): void; setSkippedClass(index: any): void; toggleScreenRotate(event?: KeyboardEvent | MouseEvent): void; validateSelectedOption(option: any, type?: string): void; infoPopupTimeOut(): void; correctFeedBackTimeOut(type?: string): void; goToSlide(index: any): void; goToQuestion(event: any): void; highlightQuestion(): void; getSolutions(): void; viewSolution(): void; closeSolution(): void; viewHint(): void; onAnswerKeyDown(event: KeyboardEvent): void; showAnswerClicked(event: any, question?: any): void; getScore(currentIndex: any, key: any, isCorrectAnswer: any, selectedOption?: any): any; calculateScore(): any; updateScoreBoard(index: any, classToBeUpdated: any, optionValue?: any, score?: any): void; setImageHeightWidthClass(): void; setImageZoom(): void; zoomIn(): void; zoomOut(): void; setImageModalHeightWidth(): void; closeZoom(): void; clearTimeInterval(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SectionPlayerComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SectionPlayerComponent, "quml-section-player", never, { "sectionConfig": { "alias": "sectionConfig"; "required": false; }; "attempts": { "alias": "attempts"; "required": false; }; "jumpToQuestion": { "alias": "jumpToQuestion"; "required": false; }; "mainProgressBar": { "alias": "mainProgressBar"; "required": false; }; "sectionIndex": { "alias": "sectionIndex"; "required": false; }; "parentConfig": { "alias": "parentConfig"; "required": false; }; }, { "playerEvent": "playerEvent"; "sectionEnd": "sectionEnd"; "showScoreBoard": "showScoreBoard"; }, never, never, false, never>; }