@dereekb/dbx-form 13.6.3 → 13.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -642,7 +642,7 @@ class DbxQuizPostQuizComponent {
642
642
  this.quizStore.setSubmittedQuiz(true);
643
643
  };
644
644
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxQuizPostQuizComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
645
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: DbxQuizPostQuizComponent, isStandalone: true, selector: "dbx-quiz-post-quiz", inputs: { handleSubmitQuiz: { classPropertyName: "handleSubmitQuiz", publicName: "handleSubmitQuiz", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"dbx-post-quiz text-center\" role=\"status\" aria-live=\"polite\">\n <h3>Quiz Completed</h3>\n <div>\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n @if (stateSignal() === 'presubmit') {\n <ng-container *ngTemplateOutlet=\"preSubmitTemplate\"></ng-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"postSubmitTemplate\"></ng-container>\n }\n </div>\n</div>\n\n<!-- Pre-Submit -->\n<ng-template #preSubmitTemplate>\n <ng-content select=\"[presubmit]\"></ng-content>\n @if (handleSubmitQuiz()) {\n <div class=\"dbx-post-quiz-submit\">\n <div dbxAction dbxActionLogger dbxActionValue dbxActionSnackbarError [dbxActionHandler]=\"handleSubmitQuizButton\" [dbxActionSuccessHandler]=\"handleSubmitQuizSuccess\">\n <dbx-button [disabled]=\"quizSubmittedSignal()\" [raised]=\"true\" dbxActionButton>Submit Quiz</dbx-button>\n </div>\n </div>\n }\n</ng-template>\n\n<!-- Post-Submit -->\n<ng-template #postSubmitTemplate>\n <ng-content select=\"[postsubmit]\"></ng-content>\n</ng-template>\n\n<!-- Content -->\n<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: DbxButtonModule }, { kind: "directive", type: i1$1.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: i1.DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "allowClickPropagation", "mode"] }, { kind: "ngmodule", type: DbxActionModule }, { kind: "directive", type: i1$1.DbxActionDirective, selector: "dbx-action,[dbxAction]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i1$1.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i1$1.DbxActionValueDirective, selector: "dbxActionValue,[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i1$1.DbxActionContextLoggerDirective, selector: "[dbxActionLogger],[dbxActionContextLogger]" }, { kind: "directive", type: i1$1.DbxActionSuccessHandlerDirective, selector: "[dbxActionSuccessHandler]", inputs: ["dbxActionSuccessHandler"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
645
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: DbxQuizPostQuizComponent, isStandalone: true, selector: "dbx-quiz-post-quiz", inputs: { handleSubmitQuiz: { classPropertyName: "handleSubmitQuiz", publicName: "handleSubmitQuiz", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"dbx-post-quiz text-center\" role=\"status\" aria-live=\"polite\">\n <h3>Quiz Completed</h3>\n <div>\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n @if (stateSignal() === 'presubmit') {\n <ng-container *ngTemplateOutlet=\"preSubmitTemplate\"></ng-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"postSubmitTemplate\"></ng-container>\n }\n </div>\n</div>\n\n<!-- Pre-Submit -->\n<ng-template #preSubmitTemplate>\n <ng-content select=\"[presubmit]\"></ng-content>\n @if (handleSubmitQuiz()) {\n <div class=\"dbx-post-quiz-submit\">\n <div dbxAction dbxActionLogger dbxActionValue dbxActionSnackbarError [dbxActionHandler]=\"handleSubmitQuizButton\" [dbxActionSuccessHandler]=\"handleSubmitQuizSuccess\">\n <dbx-button [disabled]=\"quizSubmittedSignal()\" [raised]=\"true\" dbxActionButton>Submit Quiz</dbx-button>\n </div>\n </div>\n }\n</ng-template>\n\n<!-- Post-Submit -->\n<ng-template #postSubmitTemplate>\n <ng-content select=\"[postsubmit]\"></ng-content>\n</ng-template>\n\n<!-- Content -->\n<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: DbxButtonModule }, { kind: "directive", type: i1$1.DbxActionButtonDirective, selector: "[dbxActionButton]", inputs: ["dbxActionButtonEcho"] }, { kind: "component", type: i1.DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "allowClickPropagation", "mode"] }, { kind: "ngmodule", type: DbxActionModule }, { kind: "directive", type: i1$1.DbxActionDirective, selector: "dbx-action,[dbxAction]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i1$1.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i1$1.DbxActionValueDirective, selector: "dbxActionValue,[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i1$1.DbxActionContextLoggerDirective, selector: "[dbxActionLogger],[dbxActionContextLogger]" }, { kind: "directive", type: i1$1.DbxActionSuccessHandlerDirective, selector: "[dbxActionSuccessHandler]", inputs: ["dbxActionSuccessHandler"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
646
646
  }
647
647
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxQuizPostQuizComponent, decorators: [{
648
648
  type: Component,
@@ -671,7 +671,7 @@ class DbxQuizResetButtonComponent {
671
671
  <dbx-button [raised]="true" [text]="buttonText()" dbxActionButton></dbx-button>
672
672
  </div>
673
673
  </div>
674
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: DbxButtonModule }, { kind: "directive", type: i1$1.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: i1.DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "allowClickPropagation", "mode"] }, { kind: "ngmodule", type: DbxActionModule }, { kind: "directive", type: i1$1.DbxActionDirective, selector: "dbx-action,[dbxAction]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i1$1.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i1$1.DbxActionValueDirective, selector: "dbxActionValue,[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i1$1.DbxActionContextLoggerDirective, selector: "[dbxActionLogger],[dbxActionContextLogger]" }] });
674
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: DbxButtonModule }, { kind: "directive", type: i1$1.DbxActionButtonDirective, selector: "[dbxActionButton]", inputs: ["dbxActionButtonEcho"] }, { kind: "component", type: i1.DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "allowClickPropagation", "mode"] }, { kind: "ngmodule", type: DbxActionModule }, { kind: "directive", type: i1$1.DbxActionDirective, selector: "dbx-action,[dbxAction]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i1$1.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i1$1.DbxActionValueDirective, selector: "dbxActionValue,[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i1$1.DbxActionContextLoggerDirective, selector: "[dbxActionLogger],[dbxActionContextLogger]" }] });
675
675
  }
676
676
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxQuizResetButtonComponent, decorators: [{
677
677
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"dereekb-dbx-form-quiz.mjs","sources":["../../../../packages/dbx-form/quiz/src/lib/store/quiz.store.ts","../../../../packages/dbx-form/quiz/src/lib/store/quiz.accessor.ts","../../../../packages/dbx-form/quiz/src/lib/container/quiz.component.ts","../../../../packages/dbx-form/quiz/src/lib/container/quiz.component.html","../../../../packages/dbx-form/quiz/src/lib/component/quiz.answer.number.component.ts","../../../../packages/dbx-form/quiz/src/lib/component/quiz.answer.number.component.html","../../../../packages/dbx-form/quiz/src/lib/component/quiz.answer.multiplechoice.component.ts","../../../../packages/dbx-form/quiz/src/lib/component/quiz.answer.multiplechoice.component.html","../../../../packages/dbx-form/quiz/src/lib/component/quiz.prequiz.intro.component.ts","../../../../packages/dbx-form/quiz/src/lib/component/quiz.prequiz.intro.component.html","../../../../packages/dbx-form/quiz/src/lib/component/quiz.question.text.component.ts","../../../../packages/dbx-form/quiz/src/lib/component/quiz.question.text.component.html","../../../../packages/dbx-form/quiz/src/lib/component/quiz.postquiz.component.ts","../../../../packages/dbx-form/quiz/src/lib/component/quiz.postquiz.component.html","../../../../packages/dbx-form/quiz/src/lib/component/quiz.reset.button.component.ts","../../../../packages/dbx-form/quiz/src/lib/component/quiz.score.component.ts","../../../../packages/dbx-form/quiz/src/lib/quiz.util.ts","../../../../packages/dbx-form/quiz/src/dereekb-dbx-form-quiz.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { type QuestionIndex, type Quiz, type QuizAnswer, type QuizQuestion, type QuizQuestionId, type QuizQuestionIdIndexPair, type QuizQuestionWithIndex } from './quiz';\nimport { ComponentStore } from '@ngrx/component-store';\nimport { type ArrayOrValue, asArray, type Configurable, type Maybe } from '@dereekb/util';\nimport { combineLatest, distinctUntilChanged, map, type Observable, of, shareReplay, switchMap } from 'rxjs';\nimport { asObservable, type ObservableOrValue } from '@dereekb/rxjs';\n\n/**\n * Internal state shape managed by QuizStore.\n */\nexport interface QuizStoreState {\n /**\n * Map of questions, keyed by id.\n *\n * Unset if the quiz is not yet set.\n */\n readonly questionMap?: Maybe<ReadonlyMap<QuizQuestionId, QuizQuestion>>;\n /**\n * Started quiz\n */\n readonly startedQuiz: boolean;\n /**\n * Questions that have been answered, sorted by index.\n */\n readonly completedQuestions: QuizQuestionIdIndexPair[];\n /**\n * Questions that are remaining to be answered, sorted by index.\n */\n readonly unansweredQuestions: QuizQuestionIdIndexPair[];\n /**\n * Map of current answers.\n */\n readonly answers: ReadonlyMap<QuizQuestionId, QuizAnswer>;\n /**\n * The current index that corresponds with the selected question.\n *\n * If null, defaults to the first question.\n *\n * If greater than the total number of questions, then the quiz is considered complete.\n */\n readonly questionIndex?: Maybe<QuestionIndex>;\n /**\n * If true, the quiz is locked from navigation.\n *\n * Typically used while submitting the quiz.\n */\n readonly lockQuizNavigation?: boolean;\n /**\n * If true, the quiz has been marked as submitted.\n */\n readonly submittedQuiz?: boolean;\n /**\n * The current/active quiz.\n */\n readonly quiz?: Maybe<Quiz>;\n /**\n * If true, allows going back to visit previous questions.\n */\n readonly allowVisitingPreviousQuestion: boolean;\n /**\n * If true, automatically advances to the next question when an answer is set.\n */\n readonly autoAdvanceToNextQuestion: boolean;\n /**\n * Whether or not skipping questions is allowed.\n *\n * Defaults to false.\n */\n readonly allowSkipQuestion: boolean;\n}\n\n/**\n * Lookup input for retrieving an answer by question id, index, or the current question.\n * Provide exactly one of `id`, `index`, or `currentIndex`.\n */\nexport interface QuizStoreAnswerLookupInput extends Partial<QuizQuestionIdIndexPair> {\n readonly currentIndex?: boolean;\n}\n\n/**\n * NgRx ComponentStore that manages quiz lifecycle: question navigation, answer tracking,\n * submission state, and navigation locking.\n *\n * Provided at the component level by `QuizComponent`.\n *\n * @example\n * ```ts\n * // Access from a child component via DI:\n * readonly quizStore = inject(QuizStore);\n * this.quizStore.startQuiz();\n * this.quizStore.updateAnswerForCurrentQuestion(5);\n * ```\n */\n@Injectable()\nexport class QuizStore extends ComponentStore<QuizStoreState> {\n constructor() {\n super({\n quiz: undefined,\n startedQuiz: false,\n submittedQuiz: false,\n answers: new Map(),\n questionIndex: undefined,\n unansweredQuestions: [],\n completedQuestions: [],\n questionMap: undefined,\n autoAdvanceToNextQuestion: true,\n allowVisitingPreviousQuestion: true,\n allowSkipQuestion: false\n });\n }\n\n readonly quiz$ = this.select((state) => state.quiz);\n readonly titleDetails$ = this.quiz$.pipe(map((quiz) => quiz?.titleDetails));\n readonly questions$ = this.quiz$.pipe(map((quiz) => quiz?.questions ?? []));\n readonly startedQuiz$ = this.select((state) => state.startedQuiz);\n readonly lockQuizNavigation$ = this.select((state) => state.lockQuizNavigation);\n readonly submittedQuiz$ = this.select((state) => state.submittedQuiz);\n readonly answers$ = this.select((state) => state.answers);\n readonly questionIndex$ = this.select((state) => state.questionIndex ?? 0);\n readonly completedQuestions$ = this.select((state) => state.completedQuestions);\n readonly unansweredQuestions$ = this.select((state) => state.unansweredQuestions);\n readonly hasAnswerForEachQuestion$ = this.select((state) => state.unansweredQuestions.length === 0);\n readonly isAtEndOfQuestions$ = this.select((state) => (state.questionIndex ?? 0) >= (state.quiz?.questions.length ?? 0));\n\n readonly canGoToPreviousQuestion$ = this.select((state) => !state.lockQuizNavigation && state.allowVisitingPreviousQuestion && state.questionIndex != null && state.questionIndex > 0);\n readonly canGoToNextQuestion$ = this.select((state) => {\n const newQuestionIndex = computeAdvanceIndexOnState(state, 1);\n return !state.lockQuizNavigation && state.questionIndex != null && newQuestionIndex != null && newQuestionIndex > state.questionIndex;\n });\n\n readonly currentQuestion$: Observable<Maybe<QuizQuestionWithIndex>> = combineLatest([this.questions$, this.questionIndex$]).pipe(\n map(([questions, questionIndex]) => {\n const question = questions[questionIndex];\n let result: Maybe<QuizQuestionWithIndex>;\n\n if (question) {\n result = {\n ...question,\n index: questionIndex\n };\n }\n\n return result;\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n /**\n * Returns a reactive observable of the answer for a given question, looked up by id, index, or the current question.\n *\n * @param lookupInput - Lookup criteria specifying which question's answer to retrieve\n * @returns An observable that emits the current answer for the specified question, or undefined if not answered\n *\n * @example\n * ```ts\n * // By current question:\n * store.answerForQuestion({ currentIndex: true }).subscribe(answer => console.log(answer));\n * // By question id:\n * store.answerForQuestion({ id: 'q1' }).subscribe(answer => console.log(answer));\n * ```\n *\n * @param lookupInput - Lookup criteria specifying which question's answer to retrieve\n */\n answerForQuestion(lookupInput: ObservableOrValue<QuizStoreAnswerLookupInput>): Observable<Maybe<QuizAnswer>> {\n return asObservable(lookupInput).pipe(\n switchMap((lookup) => {\n const { id, index, currentIndex } = lookup;\n let result: Observable<Maybe<QuizAnswer>>;\n\n if (currentIndex) {\n result = this.currentQuestion$.pipe(switchMap((question) => this.answerForQuestion({ index: question?.index })));\n } else if (id != null) {\n result = this.answers$.pipe(map((answers) => answers.get(id)));\n } else if (index != null) {\n result = this.questions$.pipe(\n switchMap((questions) => {\n const question = questions[index];\n let result: Observable<Maybe<QuizAnswer>>;\n\n if (question) {\n result = this.answerForQuestion({ id: question.id });\n } else {\n result = of(undefined);\n }\n\n return result;\n })\n );\n } else {\n result = of(undefined);\n }\n\n return result;\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n }\n\n readonly startQuiz = this.updater((state) => startQuizOnState(state));\n readonly setQuiz = this.updater((state, quiz: Maybe<Quiz>) => setQuizOnState(state, quiz));\n\n /**\n * Resets the quiz entirely, back to the pre-quiz state.\n */\n readonly resetQuiz = this.updater((state) => resetQuizOnState(state));\n\n /**\n * Restarts the quiz to the first question.\n */\n readonly restartQuizToFirstQuestion = this.updater((state) => restartQuizToFirstQuestionOnState(state));\n\n readonly setAnswers = this.updater((state, answers: Maybe<QuizAnswer[]>) => setAnswersOnState(state, answers));\n readonly updateAnswers = this.updater((state, answers: Maybe<QuizAnswer[]>) => updateAnswersOnState(state, answers));\n readonly updateAnswerForCurrentQuestion = this.updater((state, answerData: unknown) => updateAnswerForCurrentQuestionOnState(state, answerData));\n readonly setQuestionIndex = this.updater((state, questionIndex: QuestionIndex) => ({ ...state, questionIndex }));\n readonly setAutoAdvanceToNextQuestion = this.updater((state, autoAdvanceToNextQuestion: boolean) => ({ ...state, autoAdvanceToNextQuestion }));\n readonly setAllowSkipQuestion = this.updater((state, allowSkipQuestion: boolean) => ({ ...state, allowSkipQuestion }));\n readonly setAllowVisitingPreviousQuestion = this.updater((state, allowVisitingPreviousQuestion: boolean) => ({ ...state, allowVisitingPreviousQuestion }));\n\n readonly goToNextQuestion = this.updater((state) => advanceQuestionOnState(state, 1));\n readonly goToPreviousQuestion = this.updater((state) => advanceQuestionOnState(state, -1));\n\n readonly setLockQuizNavigation = this.updater((state, lockQuizNavigation: boolean) => ({ ...state, lockQuizNavigation }));\n readonly setSubmittedQuiz = this.updater((state, submittedQuiz: boolean) => ({ ...state, submittedQuiz }));\n}\n\nfunction computeAdvanceIndexOnState(state: QuizStoreState, advancement: number): Maybe<QuestionIndex> {\n const { questionIndex, allowSkipQuestion, unansweredQuestions, lockQuizNavigation } = state;\n const maxQuestionIndex = state.quiz?.questions.length;\n\n let newQuestionIndex: Maybe<QuestionIndex>;\n\n if (maxQuestionIndex != null && questionIndex != null && !lockQuizNavigation) {\n let maxAllowedIndex = maxQuestionIndex;\n\n if (!allowSkipQuestion) {\n maxAllowedIndex = unansweredQuestions[0]?.index ?? maxQuestionIndex;\n }\n\n newQuestionIndex = Math.max(0, Math.min(maxAllowedIndex, questionIndex + advancement));\n }\n\n return newQuestionIndex;\n}\n\nfunction advanceQuestionOnState(state: QuizStoreState, advancement: number): QuizStoreState {\n const newQuestionIndex = computeAdvanceIndexOnState(state, advancement);\n\n let nextState: QuizStoreState = state;\n\n if (newQuestionIndex != null) {\n nextState = {\n ...state,\n questionIndex: newQuestionIndex\n };\n }\n\n return nextState;\n}\n\nfunction startQuizOnState(state: QuizStoreState): QuizStoreState {\n const { startedQuiz } = state;\n let nextState: QuizStoreState = state;\n\n if (!startedQuiz) {\n nextState = {\n ...state,\n startedQuiz: true,\n submittedQuiz: false,\n lockQuizNavigation: false,\n questionIndex: 0\n };\n }\n\n return nextState;\n}\n\nfunction resetQuizOnState(state: QuizStoreState): QuizStoreState {\n return {\n ...restartQuizToFirstQuestionOnState(state),\n startedQuiz: false\n };\n}\n\nfunction restartQuizToFirstQuestionOnState(state: QuizStoreState): QuizStoreState {\n return setAnswersOnState(\n startQuizOnState({\n ...state,\n startedQuiz: false\n }),\n []\n );\n}\n\nfunction setQuizOnState(state: QuizStoreState, quiz?: Maybe<Quiz>): QuizStoreState {\n let questionMap: Maybe<ReadonlyMap<QuizQuestionId, QuizQuestion>> = undefined;\n const currentAnswers = [...state.answers.values()];\n\n if (quiz?.questions) {\n questionMap = new Map(quiz.questions.map((question) => [question.id, question]));\n }\n\n return setAnswersOnState({ ...state, quiz, questionMap }, currentAnswers);\n}\n\nfunction setAnswersOnState(state: QuizStoreState, newAnswers: Maybe<ArrayOrValue<QuizAnswer>>): QuizStoreState {\n return updateAnswersOnState(\n {\n ...state,\n answers: new Map()\n },\n newAnswers\n );\n}\n\nfunction updateAnswerForCurrentQuestionOnState(state: QuizStoreState, answerData: unknown): QuizStoreState {\n const { questionIndex } = state;\n let nextState: Configurable<QuizStoreState> = state;\n\n if (questionIndex != null) {\n const currentQuestion = state.quiz?.questions[questionIndex];\n\n if (currentQuestion) {\n const answer: QuizAnswer = {\n id: currentQuestion.id,\n data: answerData\n };\n\n nextState = updateAnswersOnState(state, [answer]);\n\n if (state.autoAdvanceToNextQuestion) {\n nextState.questionIndex = questionIndex + 1;\n }\n }\n }\n\n return nextState as QuizStoreState;\n}\n\nfunction updateAnswersOnState(state: QuizStoreState, inputAnswers: Maybe<ArrayOrValue<QuizAnswer>>): QuizStoreState {\n const { quiz, answers: currentAnswers } = state;\n\n const answers = new Map(currentAnswers);\n\n asArray(inputAnswers).forEach((answer) => {\n answers.set(answer.id, answer);\n });\n\n const completedQuestions: QuizQuestionIdIndexPair[] = [];\n const unansweredQuestions: QuizQuestionIdIndexPair[] = [];\n\n if (quiz?.questions) {\n quiz.questions.forEach((question, index) => {\n if (answers.has(question.id)) {\n completedQuestions.push({ id: question.id, index });\n } else {\n unansweredQuestions.push({ id: question.id, index });\n }\n });\n }\n\n return { ...state, unansweredQuestions, completedQuestions, answers };\n}\n","import { type Maybe } from '@dereekb/util';\nimport { type Observable, type Subscription } from 'rxjs';\nimport { type QuizQuestion, type QuizAnswer, type Quiz } from './quiz';\nimport { type Provider } from '@angular/core';\nimport { QuizStore } from './quiz.store';\n\n/**\n * Abstract accessor injected into answer/question child components to read the current question\n * and write answers back to the QuizStore without coupling to it directly.\n *\n * Use `provideCurrentQuestionQuizQuestionAccessor()` to bind this to the store's current question.\n */\nexport abstract class QuizQuestionAccessor<T = unknown> {\n /**\n * The active quiz definition.\n */\n abstract readonly quiz$: Observable<Maybe<Quiz>>;\n\n /**\n * The question this accessor is bound to.\n */\n abstract readonly question$: Observable<Maybe<QuizQuestion>>;\n\n /**\n * The current answer for this question, or undefined if unanswered.\n */\n abstract readonly answer$: Observable<Maybe<QuizAnswer<T>>>;\n\n /**\n * Submits an answer value for this question.\n */\n abstract setAnswer(answer: T): void;\n\n /**\n * Binds an observable source whose emissions are forwarded as answer updates.\n */\n abstract setAnswerSource(answer: Observable<T>): Subscription;\n}\n\n/**\n * Provides QuizQuestionAccessor bound to the current question in QuizStore.\n *\n * @returns An Angular provider that binds QuizQuestionAccessor to the current quiz question\n *\n * @usage\n * ```typescript\n * @Component({\n * providers: [QuizStore, provideCurrentQuestionQuizQuestionAccessor()]\n * })\n * ```\n */\nexport function provideCurrentQuestionQuizQuestionAccessor<T = unknown>(): Provider {\n return {\n provide: QuizQuestionAccessor,\n useFactory: (quizStore: QuizStore) => {\n return {\n quiz$: quizStore.quiz$,\n question$: quizStore.currentQuestion$,\n answer$: quizStore.answerForQuestion({ currentIndex: true }),\n setAnswer: (answer: T) => quizStore.updateAnswerForCurrentQuestion(answer),\n setAnswerSource: (answer: Observable<T>) => quizStore.updateAnswerForCurrentQuestion(answer)\n };\n },\n deps: [QuizStore]\n };\n}\n","import { Component, computed, effect, inject, input, type Signal } from '@angular/core';\nimport { QuizStore } from '../store/quiz.store';\nimport { type Maybe } from '@dereekb/util';\nimport { type Quiz } from '../store/quiz';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { combineLatest, first, map, type Observable, switchMap } from 'rxjs';\nimport { DbxInjectionComponent, type DbxInjectionComponentConfig } from '@dereekb/dbx-core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { provideCurrentQuestionQuizQuestionAccessor } from '../store/quiz.accessor';\nimport { DbxButtonModule, DbxWindowKeyDownListenerDirective } from '@dereekb/dbx-web';\n\n/**\n * Lifecycle state of the quiz container view.\n */\nexport type QuizComponentState = 'init' | 'pre-quiz' | 'quiz' | 'post-quiz';\n\n/**\n * Discriminated union of view configs, one per quiz lifecycle state.\n */\nexport type QuizComponentViewConfig = QuizComponentViewInitConfig | QuizComponentViewPreQuizConfig | QuizComponentViewQuizConfig | QuizComponentViewPostQuizConfig;\n\nexport interface QuizComponentViewInitConfig {\n readonly state: 'init';\n}\n\nexport interface QuizComponentViewPreQuizConfig {\n readonly state: 'pre-quiz';\n readonly preQuizComponent?: Maybe<DbxInjectionComponentConfig>;\n}\n\nexport interface QuizComponentViewQuizConfig {\n readonly state: 'quiz';\n readonly questionComponent?: Maybe<DbxInjectionComponentConfig>;\n readonly answerComponent?: Maybe<DbxInjectionComponentConfig>;\n}\n\nexport interface QuizComponentViewPostQuizConfig {\n readonly state: 'post-quiz';\n readonly resultsComponent?: Maybe<DbxInjectionComponentConfig>;\n}\n\n/**\n * Top-level quiz container that orchestrates pre-quiz, active quiz, and post-quiz views.\n *\n * Provides its own `QuizStore` and `QuizQuestionAccessor`, so child components injected via\n * `DbxInjectionComponent` can access quiz state directly through DI.\n *\n * Supports keyboard navigation: Enter (start / next), ArrowLeft (previous), ArrowRight (next).\n *\n * @example\n * ```html\n * <dbx-quiz [quiz]=\"myQuiz\"></dbx-quiz>\n * ```\n */\n@Component({\n selector: 'dbx-quiz',\n templateUrl: './quiz.component.html',\n imports: [DbxInjectionComponent, DbxButtonModule, DbxWindowKeyDownListenerDirective, NgTemplateOutlet],\n providers: [QuizStore, provideCurrentQuestionQuizQuestionAccessor()],\n standalone: true\n})\nexport class QuizComponent {\n readonly quizStore = inject(QuizStore);\n readonly quiz = input.required<Maybe<Quiz>>();\n\n readonly keysFilter = ['Enter', 'ArrowLeft', 'ArrowRight'];\n\n readonly quizEffect = effect(\n () => {\n const quiz = this.quiz();\n this.quizStore.setQuiz(quiz);\n },\n { allowSignalWrites: true }\n );\n\n readonly quiz$ = toObservable(this.quiz);\n readonly quizTitleSignal = computed(() => this.quiz()?.titleDetails.title);\n\n readonly currentQuestionSignal = toSignal(this.quizStore.currentQuestion$);\n\n readonly questionTitleSignal = computed(() => {\n const currentQuestion = this.currentQuestionSignal();\n return currentQuestion ? `Question ${currentQuestion.index + 1}` : '';\n });\n\n readonly startedQuiz$ = this.quizStore.startedQuiz$;\n readonly currentQuestion$ = this.quizStore.currentQuestion$;\n\n readonly canGoToPreviousQuestionSignal: Signal<boolean> = toSignal(this.quizStore.canGoToPreviousQuestion$, { initialValue: false });\n readonly canGoToNextQuestionSignal: Signal<boolean> = toSignal(this.quizStore.canGoToNextQuestion$, { initialValue: false });\n\n readonly viewConfig$: Observable<QuizComponentViewConfig> = this.startedQuiz$.pipe(\n switchMap((started) => {\n if (!started) {\n return this.quiz$.pipe(\n map((quiz) => {\n const viewConfig: QuizComponentViewPreQuizConfig = {\n state: 'pre-quiz',\n preQuizComponent: quiz?.preQuizComponentConfig\n };\n\n return viewConfig;\n })\n );\n } else {\n return combineLatest([this.quiz$, this.currentQuestion$, this.quizStore.isAtEndOfQuestions$]).pipe(\n map(([quiz, currentQuestion, isAtEndOfQuestions]) => {\n let viewConfig: QuizComponentViewConfig;\n\n if (isAtEndOfQuestions) {\n viewConfig = {\n state: 'post-quiz',\n resultsComponent: quiz?.resultsComponentConfig\n };\n } else {\n viewConfig = {\n state: 'quiz',\n questionComponent: currentQuestion?.questionComponentConfig,\n answerComponent: currentQuestion?.answerComponentConfig\n };\n }\n\n return viewConfig;\n })\n );\n }\n })\n );\n\n readonly viewConfigSignal: Signal<QuizComponentViewConfig> = toSignal(this.viewConfig$, { initialValue: { state: 'init' } as QuizComponentViewConfig });\n readonly viewStateSignal: Signal<QuizComponentState> = computed(() => this.viewConfigSignal()?.state ?? 'init');\n\n readonly preQuizComponentConfigSignal: Signal<Maybe<DbxInjectionComponentConfig>> = computed(() => (this.viewConfigSignal() as QuizComponentViewPreQuizConfig)?.preQuizComponent);\n readonly questionComponentConfigSignal: Signal<Maybe<DbxInjectionComponentConfig>> = computed(() => (this.viewConfigSignal() as QuizComponentViewQuizConfig)?.questionComponent);\n readonly answerComponentConfigSignal: Signal<Maybe<DbxInjectionComponentConfig>> = computed(() => (this.viewConfigSignal() as QuizComponentViewQuizConfig)?.answerComponent);\n readonly resultsComponentConfigSignal: Signal<Maybe<DbxInjectionComponentConfig>> = computed(() => (this.viewConfigSignal() as QuizComponentViewPostQuizConfig)?.resultsComponent);\n\n handleKeyDown(event: KeyboardEvent) {\n const code = event.code;\n\n switch (code) {\n case 'Enter':\n this.quizStore.startedQuiz$.pipe(first()).subscribe((started) => {\n if (!started) {\n this.quizStore.startQuiz();\n } else {\n this.clickNextQuestion();\n }\n });\n break;\n case 'ArrowLeft':\n this.clickPreviousQuestion();\n break;\n case 'ArrowRight':\n this.clickNextQuestion();\n break;\n }\n }\n\n clickPreviousQuestion() {\n this.quizStore.goToPreviousQuestion();\n }\n\n clickNextQuestion() {\n this.quizStore.goToNextQuestion();\n }\n}\n","<div class=\"dbx-quiz\" (dbxWindowKeyDownListener)=\"handleKeyDown($event)\" [dbxWindowKeyDownFilter]=\"keysFilter\">\n @switch (viewStateSignal()) {\n @case ('pre-quiz') {\n <ng-container *ngTemplateOutlet=\"preQuizTemplate\"></ng-container>\n }\n @case ('quiz') {\n <ng-container *ngTemplateOutlet=\"quizTemplate\"></ng-container>\n }\n @case ('post-quiz') {\n <ng-container *ngTemplateOutlet=\"postQuizTemplate\"></ng-container>\n }\n }\n</div>\n\n<!-- Pre-Quiz -->\n<ng-template #preQuizTemplate>\n <div class=\"dbx-quiz-pre-quiz\">\n <dbx-injection [config]=\"preQuizComponentConfigSignal()\"></dbx-injection>\n </div>\n</ng-template>\n\n<!-- Quiz -->\n<ng-template #quizTemplate>\n <div class=\"dbx-quiz-quiz\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n <div class=\"dbx-quiz-question dbx-pb3\">\n <h4 class=\"dbx-quiz-question-title\">{{ questionTitleSignal() }}</h4>\n <dbx-injection [config]=\"questionComponentConfigSignal()\"></dbx-injection>\n </div>\n <div class=\"dbx-quiz-answer dbx-pt3\">\n <dbx-injection [config]=\"answerComponentConfigSignal()\"></dbx-injection>\n </div>\n </div>\n</ng-template>\n\n<!-- Post-Quiz -->\n<ng-template #postQuizTemplate>\n <div class=\"dbx-quiz-post-quiz\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n <dbx-injection [config]=\"resultsComponentConfigSignal()\"></dbx-injection>\n </div>\n</ng-template>\n\n<!-- Header Template -->\n<ng-template #headerTemplate>\n <div class=\"dbx-quiz-header\">\n <div class=\"dbx-flex-group\">\n <dbx-button [disabled]=\"!canGoToPreviousQuestionSignal()\" icon=\"arrow_back\" (buttonClick)=\"clickPreviousQuestion()\"></dbx-button>\n <span class=\"spacer\"></span>\n <span class=\"mat-h2\">{{ quizTitleSignal() }}</span>\n <span class=\"spacer\"></span>\n <dbx-button [disabled]=\"!canGoToNextQuestionSignal()\" icon=\"arrow_forward\" (buttonClick)=\"clickNextQuestion()\"></dbx-button>\n </div>\n </div>\n</ng-template>\n","import { Component, computed, inject, model } from '@angular/core';\nimport { DbxButtonModule, DbxWindowKeyDownListenerDirective } from '@dereekb/dbx-web';\nimport { QuizQuestionAccessor } from '../store/quiz.accessor';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { type Maybe, range, type RangeInput } from '@dereekb/util';\n\n/**\n * Named preset for common number ranges.\n */\nexport type QuizAnswerNumberComponentPreset = 'oneToFive';\n\n/**\n * Configuration for the number answer component. Provide a preset, explicit range, or arbitrary numbers.\n */\nexport interface QuizAnswerNumberComponentConfig {\n /**\n * Uses a preset to compute the range/numbers.\n */\n readonly preset?: QuizAnswerNumberComponentPreset;\n /**\n * Range configuration\n */\n readonly range?: RangeInput;\n /**\n * Arbitrary array of numbers\n */\n readonly numbers?: number[];\n}\n\ninterface QuizAnswerNumberChoice {\n readonly number: number;\n readonly selected?: boolean;\n}\n\n/**\n * Answer component that displays configurable number buttons.\n *\n * @usage\n * Used as an answer component in a QuizQuestion's answerComponentConfig.\n * Defaults to 1-5 range if no config is provided.\n *\n * ```typescript\n * answerComponentConfig: {\n * componentClass: QuizAnswerNumberComponent,\n * init: (instance: QuizAnswerNumberComponent) => {\n * instance.config.set({ range: { start: 1, end: 11 } });\n * }\n * }\n * ```\n */\n@Component({\n templateUrl: './quiz.answer.number.component.html',\n imports: [DbxButtonModule, DbxWindowKeyDownListenerDirective],\n standalone: true\n})\nexport class QuizAnswerNumberComponent {\n readonly questionAccessor = inject<QuizQuestionAccessor<number>>(QuizQuestionAccessor);\n\n readonly config = model<Maybe<QuizAnswerNumberComponentConfig>>();\n\n readonly currentAnswerSignal = toSignal(this.questionAccessor.answer$);\n readonly currentAnswerValueSignal = computed(() => this.currentAnswerSignal()?.data);\n\n readonly choicesSignal = computed(() => {\n const { range: inputRange, numbers: inputNumbers, preset } = this.config() ?? { preset: 'oneToFive' };\n const currentAnswer = this.currentAnswerValueSignal();\n\n let useRange: Maybe<RangeInput>;\n let useNumbers: Maybe<number[]>;\n\n if (preset) {\n switch (preset) {\n case 'oneToFive':\n default:\n useRange = { start: 1, end: 6 };\n break;\n }\n } else if (inputRange) {\n useRange = inputRange;\n } else if (inputNumbers) {\n useNumbers = inputNumbers;\n }\n\n let numbers: number[];\n\n if (useRange) {\n numbers = range(useRange);\n } else if (useNumbers) {\n numbers = useNumbers ?? [];\n } else {\n numbers = [];\n }\n\n const choices: QuizAnswerNumberChoice[] = numbers.map((number) => {\n return {\n number,\n selected: currentAnswer === number\n };\n });\n\n return choices;\n });\n\n readonly relevantKeysSignal = computed<string[]>(() => {\n const choices = this.choicesSignal();\n return choices.map((choice) => choice.number.toString());\n });\n\n clickedAnswer(answer: number) {\n this.questionAccessor.setAnswer(answer);\n }\n\n handleKeyDown(event: KeyboardEvent) {\n const number = Number(event.key);\n if (!isNaN(number)) {\n this.clickedAnswer(number);\n }\n }\n}\n","<div class=\"dbx-quiz-answer-number\" (dbxWindowKeyDownListener)=\"handleKeyDown($event)\" [dbxWindowKeyDownFilter]=\"relevantKeysSignal()\">\n <div class=\"dbx-quiz-answer-number-buttons dbx-button-wrap-group\" role=\"radiogroup\" aria-label=\"Answer choices\">\n @for (choice of choicesSignal(); track choice.number) {\n <dbx-button role=\"radio\" [attr.aria-checked]=\"choice.selected\" [attr.aria-label]=\"'' + choice.number\" [color]=\"choice.selected ? 'accent' : 'primary'\" [raised]=\"true\" (buttonClick)=\"clickedAnswer(choice.number)\">{{ choice.number }}</dbx-button>\n }\n </div>\n</div>\n","import { Component, computed, inject, model } from '@angular/core';\nimport { DbxButtonModule, DbxWindowKeyDownListenerDirective } from '@dereekb/dbx-web';\nimport { type Maybe, range } from '@dereekb/util';\nimport { QuizQuestionAccessor } from '../store/quiz.accessor';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\nconst MULTIPLE_CHOICE_LETTERS = `abcdefghijklmnopqrstuvwxyz`;\n\n/**\n * Upper-case letter label for a multiple choice option (e.g. \"A\", \"B\").\n */\nexport type MultipleChoiceLetter = string;\n\n/**\n * Display text for a single multiple choice option.\n */\nexport type MultipleChoiceText = string;\n\n/**\n * Answer data stored when a multiple choice option is selected.\n */\nexport interface MultipleChoiceAnswer {\n readonly isCorrectAnswer: boolean;\n readonly letter: MultipleChoiceLetter;\n readonly text: MultipleChoiceText;\n}\n\n/**\n * Configuration for the multiple choice answer component.\n */\nexport interface QuizAnswerMultipleChoiceComponentConfig {\n /**\n * Ordered list of answer option texts. Letters are auto-assigned A, B, C, etc.\n */\n readonly answerText: readonly MultipleChoiceText[];\n /**\n * Zero-based index of the correct answer, used to set `isCorrectAnswer` on the stored answer.\n */\n readonly correctAnswerIndex?: number;\n}\n\ninterface QuizAnswerMultipleChoice extends MultipleChoiceAnswer {\n readonly selected?: boolean;\n}\n\n/**\n * Answer component that displays multiple choice letter-labeled buttons.\n *\n * @usage\n * Used as an answer component in a QuizQuestion's answerComponentConfig.\n * Supports keyboard shortcuts (pressing the letter key selects that answer).\n *\n * ```typescript\n * answerComponentConfig: {\n * componentClass: QuizAnswerMultipleChoiceComponent,\n * init: (instance: QuizAnswerMultipleChoiceComponent) => {\n * instance.config.set({\n * answerText: ['Option A', 'Option B', 'Option C'],\n * correctAnswerIndex: 1\n * });\n * }\n * }\n * ```\n */\n@Component({\n templateUrl: './quiz.answer.multiplechoice.component.html',\n imports: [DbxButtonModule, DbxWindowKeyDownListenerDirective],\n standalone: true\n})\nexport class QuizAnswerMultipleChoiceComponent {\n readonly questionAccessor = inject<QuizQuestionAccessor<QuizAnswerMultipleChoice>>(QuizQuestionAccessor);\n\n readonly config = model<Maybe<QuizAnswerMultipleChoiceComponentConfig>>();\n\n readonly currentAnswerSignal = toSignal(this.questionAccessor.answer$);\n readonly currentAnswerValueSignal = computed(() => this.currentAnswerSignal()?.data);\n\n readonly choicesSignal = computed(() => {\n const config = this.config();\n\n const currentAnswer = this.currentAnswerValueSignal();\n const answers = config?.answerText ?? [];\n const correctAnswerIndex = config?.correctAnswerIndex;\n\n const choices: QuizAnswerMultipleChoice[] = answers.map((text, i) => {\n const letter = MULTIPLE_CHOICE_LETTERS[i];\n\n return {\n letter: MULTIPLE_CHOICE_LETTERS[i].toUpperCase(),\n text,\n selected: currentAnswer?.letter === letter,\n isCorrectAnswer: correctAnswerIndex === i\n };\n });\n\n return choices;\n });\n\n readonly relevantKeysSignal = computed<string[]>(() => {\n const answersCount = this.config()?.answerText.length ?? 0;\n const relevantKeys = [];\n\n const numbersRange = answersCount > 0 ? range(1, answersCount + 1) : [];\n\n for (const number of numbersRange) {\n const answerLetter = MULTIPLE_CHOICE_LETTERS[number - 1];\n relevantKeys.push(answerLetter);\n }\n\n return relevantKeys;\n });\n\n clickedAnswer(answer: QuizAnswerMultipleChoice) {\n this.questionAccessor.setAnswer(answer);\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (event.key.length === 1) {\n const choices = this.choicesSignal();\n const selectedLetter = event.key.toUpperCase();\n const choice = choices.find((x) => x.letter === selectedLetter);\n\n if (choice) {\n this.clickedAnswer(choice);\n }\n }\n }\n}\n","<div class=\"dbx-quiz-answer-multiplechoice\" (dbxWindowKeyDownListener)=\"handleKeyDown($event)\" [dbxWindowKeyDownFilter]=\"relevantKeysSignal()\">\n <div class=\"dbx-quiz-answer-multiplechoice-buttons dbx-button-column dbx-button-wide\" role=\"radiogroup\" aria-label=\"Answer choices\">\n @for (choice of choicesSignal(); track choice.letter) {\n <dbx-button class=\"dbx-w100\" role=\"radio\" [attr.aria-checked]=\"choice.selected\" [attr.aria-label]=\"choice.letter + ') ' + choice.text\" [color]=\"choice.selected ? 'accent' : 'primary'\" [raised]=\"true\" (buttonClick)=\"clickedAnswer(choice)\">\n <div class=\"dbx-quiz-answer-multiplechoice-button-content\">\n <span class=\"dbx-quiz-answer-multiplechoice-button-letter\">{{ choice.letter }})</span>\n <span class=\"dbx-quiz-answer-multiplechoice-button-text\">{{ choice.text }}</span>\n </div>\n </dbx-button>\n }\n </div>\n</div>\n","import { Component, computed, inject, model } from '@angular/core';\nimport { QuizStore } from '../store/quiz.store';\nimport { DbxButtonModule } from '@dereekb/dbx-web';\nimport { type Maybe, type MaybeMap } from '@dereekb/util';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { type QuizTitleDetails } from '../store/quiz';\n\n/**\n * Config for the pre-quiz intro component.\n *\n * Overrides the title details.\n */\nexport type QuizPreQuizIntroConfig = Partial<MaybeMap<QuizTitleDetails>>;\n\n/**\n * Pre-quiz intro component that displays the quiz title, subtitle, description, and a start button.\n *\n * @usage\n * Used as a preQuizComponentConfig in a Quiz definition.\n * Inherits title details from the quiz unless overridden via config.\n *\n * ```typescript\n * preQuizComponentConfig: {\n * componentClass: QuizPreQuizIntroComponent,\n * init: (instance: QuizPreQuizIntroComponent) => {\n * instance.config.set({ subtitle: 'Custom subtitle' });\n * }\n * }\n * ```\n */\n@Component({\n templateUrl: './quiz.prequiz.intro.component.html',\n imports: [DbxButtonModule],\n standalone: true\n})\nexport class QuizPreQuizIntroComponent {\n readonly quizStore = inject(QuizStore);\n\n readonly config = model<Maybe<QuizPreQuizIntroConfig>>();\n readonly quizTitleDetailsSignal = toSignal(this.quizStore.titleDetails$);\n\n readonly configSignal = computed(() => {\n const config = this.config();\n const titleDetails = this.quizTitleDetailsSignal();\n\n return {\n title: config?.title ?? titleDetails?.title,\n subtitle: config?.subtitle ?? titleDetails?.subtitle,\n description: config?.description ?? titleDetails?.description\n };\n });\n\n readonly titleSignal = computed(() => this.configSignal()?.title);\n readonly subtitleSignal = computed(() => this.configSignal()?.subtitle);\n readonly descriptionSignal = computed(() => this.configSignal()?.description);\n}\n","<div>\n <div>\n <h1>{{ titleSignal() }}</h1>\n <h2>{{ subtitleSignal() }}</h2>\n <p>{{ descriptionSignal() }}</p>\n </div>\n <div>\n <dbx-button [raised]=\"true\" (buttonClick)=\"quizStore.startQuiz()\" text=\"Start Quiz\"></dbx-button>\n </div>\n</div>\n","import { Component, computed, model } from '@angular/core';\nimport { type Maybe } from '@dereekb/util';\n\n/**\n * Configuration for the text-based question display. Used with `quizAgreementPrompt()` and\n * `quizFrequencyPrompt()` helpers for Likert-scale questions.\n */\nexport interface QuizQuestionTextComponentConfig {\n /**\n * Instructional prompt displayed above the main text (e.g. \"Rate how much you agree:\").\n */\n readonly prompt?: string;\n /**\n * The primary question or statement text.\n */\n readonly text: string;\n /**\n * Scale guidance displayed below the text (e.g. \"1 = Strongly Disagree, 5 = Strongly Agree\").\n */\n readonly guidance?: string;\n}\n\n/**\n * Question component that displays text with optional prompt and guidance.\n *\n * @usage\n * Used as a questionComponentConfig in a QuizQuestion definition.\n *\n * ```typescript\n * questionComponentConfig: {\n * componentClass: QuizQuestionTextComponent,\n * init: (instance: QuizQuestionTextComponent) => {\n * instance.config.set({ text: 'How do you handle ambiguity?', prompt: 'Rate yourself:', guidance: '1=Never, 5=Always' });\n * }\n * }\n * ```\n */\n@Component({\n templateUrl: './quiz.question.text.component.html',\n standalone: true\n})\nexport class QuizQuestionTextComponent {\n readonly config = model<Maybe<QuizQuestionTextComponentConfig>>();\n\n readonly promptSignal = computed(() => this.config()?.prompt);\n readonly textSignal = computed(() => this.config()?.text);\n readonly guidanceSignal = computed(() => this.config()?.guidance);\n}\n","<div class=\"dbx-quiz-question-text\" role=\"group\" aria-label=\"Question\">\n <div class=\"dbx-quiz-question-text-content\">\n @if (promptSignal() !== null) {\n <div class=\"dbx-hint dbx-pb3\" aria-label=\"Prompt\">{{ promptSignal() }}</div>\n }\n <div class=\"dbx-pb3\">{{ textSignal() }}</div>\n @if (guidanceSignal() !== null) {\n <div class=\"dbx-small dbx-hint\" role=\"note\">{{ guidanceSignal() }}</div>\n }\n </div>\n</div>\n","import { Component, computed, inject, input } from '@angular/core';\nimport { DbxActionModule, DbxButtonModule } from '@dereekb/dbx-web';\nimport { QuizStore } from '../store/quiz.store';\nimport { type Work } from '@dereekb/rxjs';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { type DbxActionSuccessHandlerFunction } from '@dereekb/dbx-core';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * Submission lifecycle state within the post-quiz view.\n */\nexport type DbxQuizPostQuizState = 'presubmit' | 'postsubmit';\n\n/**\n * Post-quiz component that handles quiz submission and displays pre/post submit content.\n *\n * @usage\n * Use as a wrapper in your results component template:\n *\n * ```html\n * <dbx-quiz-post-quiz [handleSubmitQuiz]=\"handleSubmitQuiz\">\n * <div presubmit>Pre-submit content...</div>\n * <div postsubmit>Post-submit content (scores, etc.)...</div>\n * </dbx-quiz-post-quiz>\n * ```\n */\n@Component({\n selector: 'dbx-quiz-post-quiz',\n templateUrl: './quiz.postquiz.component.html',\n imports: [DbxButtonModule, DbxActionModule, NgTemplateOutlet],\n standalone: true\n})\nexport class DbxQuizPostQuizComponent {\n readonly quizStore = inject(QuizStore);\n\n readonly quizSubmittedSignal = toSignal(this.quizStore.submittedQuiz$);\n\n readonly stateSignal = computed(() => {\n const submitted = this.quizSubmittedSignal();\n\n if (submitted) {\n return 'postsubmit';\n } else {\n return 'presubmit';\n }\n });\n\n readonly handleSubmitQuiz = input<Work<void>>();\n\n readonly handleSubmitQuizButton: Work<void> = (_, context) => {\n this.quizStore.setLockQuizNavigation(true);\n const handler = this.handleSubmitQuiz();\n\n if (handler) {\n return handler(_, context);\n } else {\n context.reject();\n }\n };\n\n readonly handleSubmitQuizSuccess: DbxActionSuccessHandlerFunction = () => {\n this.quizStore.setSubmittedQuiz(true);\n };\n}\n","<div class=\"dbx-post-quiz text-center\" role=\"status\" aria-live=\"polite\">\n <h3>Quiz Completed</h3>\n <div>\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n @if (stateSignal() === 'presubmit') {\n <ng-container *ngTemplateOutlet=\"preSubmitTemplate\"></ng-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"postSubmitTemplate\"></ng-container>\n }\n </div>\n</div>\n\n<!-- Pre-Submit -->\n<ng-template #preSubmitTemplate>\n <ng-content select=\"[presubmit]\"></ng-content>\n @if (handleSubmitQuiz()) {\n <div class=\"dbx-post-quiz-submit\">\n <div dbxAction dbxActionLogger dbxActionValue dbxActionSnackbarError [dbxActionHandler]=\"handleSubmitQuizButton\" [dbxActionSuccessHandler]=\"handleSubmitQuizSuccess\">\n <dbx-button [disabled]=\"quizSubmittedSignal()\" [raised]=\"true\" dbxActionButton>Submit Quiz</dbx-button>\n </div>\n </div>\n }\n</ng-template>\n\n<!-- Post-Submit -->\n<ng-template #postSubmitTemplate>\n <ng-content select=\"[postsubmit]\"></ng-content>\n</ng-template>\n\n<!-- Content -->\n<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n","import { Component, inject, input } from '@angular/core';\nimport { DbxActionModule, DbxButtonModule } from '@dereekb/dbx-web';\nimport { QuizStore } from '../store/quiz.store';\nimport { type Work } from '@dereekb/rxjs';\n\n/**\n * Button component that restarts the quiz to the first question.\n *\n * @usage\n * ```html\n * <dbx-quiz-reset-button buttonText=\"Try Again\"></dbx-quiz-reset-button>\n * ```\n */\n@Component({\n selector: 'dbx-quiz-reset-button',\n template: `\n <div class=\"dbx-quiz-reset-button\">\n <div dbxAction dbxActionLogger dbxActionValue dbxActionSnackbarError [dbxActionHandler]=\"handleResetQuizButton\">\n <dbx-button [raised]=\"true\" [text]=\"buttonText()\" dbxActionButton></dbx-button>\n </div>\n </div>\n `,\n imports: [DbxButtonModule, DbxActionModule],\n standalone: true\n})\nexport class DbxQuizResetButtonComponent {\n readonly quizStore = inject(QuizStore);\n\n readonly buttonText = input<string>(`Restart Quiz`);\n\n readonly handleResetQuizButton: Work<void> = (_, context) => {\n this.quizStore.restartQuizToFirstQuestion();\n context.success();\n };\n}\n","import { Component, computed, input } from '@angular/core';\nimport { type Maybe } from '@dereekb/util';\nimport { DbxQuizResetButtonComponent } from './quiz.reset.button.component';\n\n/**\n * Input data for rendering the quiz score display.\n */\nexport interface DbxQuizScoreInput {\n /**\n * Whether to show the retake/reset button.\n */\n readonly showRetakeButton?: boolean;\n /**\n * Feedback text to display.\n */\n readonly feedbackText: string;\n /**\n * Optional subtitle text.\n */\n readonly subtitle?: Maybe<string>;\n /**\n * The score achieved.\n */\n readonly score: number;\n /**\n * The maximum possible score.\n */\n readonly maxScore: number;\n}\n\n/**\n * Generic quiz score display component.\n *\n * @usage\n * ```html\n * <dbx-quiz-score [input]=\"scoreInput\"></dbx-quiz-score>\n * ```\n */\n@Component({\n selector: 'dbx-quiz-score',\n template: `\n <div class=\"dbx-quiz-score\">\n <h3 class=\"dbx-quiz-score-score\">{{ scoreSignal() }}/{{ maxScoreSignal() }}</h3>\n <p class=\"dbx-quiz-score-text\">{{ feedbackTextSignal() }}</p>\n @if (subtitleSignal()) {\n <p class=\"dbx-quiz-score-subtitle\">{{ subtitleSignal() }}</p>\n }\n @if (showRetakeButtonSignal()) {\n <dbx-quiz-reset-button buttonText=\"Retake Quiz\"></dbx-quiz-reset-button>\n }\n </div>\n `,\n imports: [DbxQuizResetButtonComponent],\n standalone: true\n})\nexport class DbxQuizScoreComponent {\n readonly input = input<Maybe<DbxQuizScoreInput>>();\n\n readonly scoreSignal = computed(() => this.input()?.score);\n readonly maxScoreSignal = computed(() => this.input()?.maxScore);\n readonly feedbackTextSignal = computed(() => this.input()?.feedbackText ?? '');\n readonly subtitleSignal = computed(() => this.input()?.subtitle);\n readonly showRetakeButtonSignal = computed(() => this.input()?.showRetakeButton);\n}\n","import { type QuizQuestionTextComponentConfig } from './component/quiz.question.text.component';\n\n/**\n * Creates a Likert scale question config with agreement prompt (Strongly Disagree to Strongly Agree).\n *\n * @param text - The statement to rate agreement on\n * @returns A quiz question config with an agreement-based prompt and guidance text\n *\n * @example\n * ```ts\n * instance.config.set(quizAgreementPrompt('I feel confident leading under pressure.'));\n * // { prompt: 'Please rate how much you agree...', text: '...', guidance: '1 = Strongly Disagree, 5 = Strongly Agree' }\n * ```\n *\n * @param text - The statement to rate agreement on\n */\nexport function quizAgreementPrompt(text: string): QuizQuestionTextComponentConfig {\n return {\n prompt: 'Please rate how much you agree with the following statement:',\n text,\n guidance: '1 = Strongly Disagree, 5 = Strongly Agree'\n };\n}\n\n/**\n * Creates a Likert scale question config with frequency prompt (Never to Always).\n *\n * @param text - The statement to rate frequency on\n * @returns A quiz question config with a frequency-based prompt and guidance text\n *\n * @example\n * ```ts\n * instance.config.set(quizFrequencyPrompt('I break vague direction into first steps.'));\n * // { prompt: 'Please rate how much you agree...', text: '...', guidance: '1 = Never, 5 = Always' }\n * ```\n *\n * @param text - The statement to rate frequency on\n */\nexport function quizFrequencyPrompt(text: string): QuizQuestionTextComponentConfig {\n return {\n prompt: 'Please rate how much you agree with the following statement:',\n text,\n guidance: '1 = Never, 5 = Always'\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;AA+EA;;;;;;;;;;;;;AAaG;AAEG,MAAO,SAAU,SAAQ,cAA8B,CAAA;AAC3D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,CAAC;AACJ,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,WAAW,EAAE,KAAK;AAClB,YAAA,aAAa,EAAE,KAAK;YACpB,OAAO,EAAE,IAAI,GAAG,EAAE;AAClB,YAAA,aAAa,EAAE,SAAS;AACxB,YAAA,mBAAmB,EAAE,EAAE;AACvB,YAAA,kBAAkB,EAAE,EAAE;AACtB,YAAA,WAAW,EAAE,SAAS;AACtB,YAAA,yBAAyB,EAAE,IAAI;AAC/B,YAAA,6BAA6B,EAAE,IAAI;AACnC,YAAA,iBAAiB,EAAE;AACpB,SAAA,CAAC;IACJ;AAES,IAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK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AftB;;;;;;;;;;;AAWT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACS,2BAA2B,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAG1B,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAjBjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,QAAQ,EAAE;;;;;;;;;;;AAWT,EAAA,CAAA;oBACD,OAAO,EAAE,CAAC,2BAA2B,CAAC;AACtC,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACpDD;;;;;;;;;;;;;AAaG;AACG,SAAU,mBAAmB,CAAC,IAAY,EAAA;IAC9C,OAAO;AACL,QAAA,MAAM,EAAE,8DAA8D;QACtE,IAAI;AACJ,QAAA,QAAQ,EAAE;KACX;AACH;AAEA;;;;;;;;;;;;;AAaG;AACG,SAAU,mBAAmB,CAAC,IAAY,EAAA;IAC9C,OAAO;AACL,QAAA,MAAM,EAAE,8DAA8D;QACtE,IAAI;AACJ,QAAA,QAAQ,EAAE;KACX;AACH;;AC5CA;;AAEG;;;;"}
1
+ {"version":3,"file":"dereekb-dbx-form-quiz.mjs","sources":["../../../../packages/dbx-form/quiz/src/lib/store/quiz.store.ts","../../../../packages/dbx-form/quiz/src/lib/store/quiz.accessor.ts","../../../../packages/dbx-form/quiz/src/lib/container/quiz.component.ts","../../../../packages/dbx-form/quiz/src/lib/container/quiz.component.html","../../../../packages/dbx-form/quiz/src/lib/component/quiz.answer.number.component.ts","../../../../packages/dbx-form/quiz/src/lib/component/quiz.answer.number.component.html","../../../../packages/dbx-form/quiz/src/lib/component/quiz.answer.multiplechoice.component.ts","../../../../packages/dbx-form/quiz/src/lib/component/quiz.answer.multiplechoice.component.html","../../../../packages/dbx-form/quiz/src/lib/component/quiz.prequiz.intro.component.ts","../../../../packages/dbx-form/quiz/src/lib/component/quiz.prequiz.intro.component.html","../../../../packages/dbx-form/quiz/src/lib/component/quiz.question.text.component.ts","../../../../packages/dbx-form/quiz/src/lib/component/quiz.question.text.component.html","../../../../packages/dbx-form/quiz/src/lib/component/quiz.postquiz.component.ts","../../../../packages/dbx-form/quiz/src/lib/component/quiz.postquiz.component.html","../../../../packages/dbx-form/quiz/src/lib/component/quiz.reset.button.component.ts","../../../../packages/dbx-form/quiz/src/lib/component/quiz.score.component.ts","../../../../packages/dbx-form/quiz/src/lib/quiz.util.ts","../../../../packages/dbx-form/quiz/src/dereekb-dbx-form-quiz.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { type QuestionIndex, type Quiz, type QuizAnswer, type QuizQuestion, type QuizQuestionId, type QuizQuestionIdIndexPair, type QuizQuestionWithIndex } from './quiz';\nimport { ComponentStore } from '@ngrx/component-store';\nimport { type ArrayOrValue, asArray, type Configurable, type Maybe } from '@dereekb/util';\nimport { combineLatest, distinctUntilChanged, map, type Observable, of, shareReplay, switchMap } from 'rxjs';\nimport { asObservable, type ObservableOrValue } from '@dereekb/rxjs';\n\n/**\n * Internal state shape managed by QuizStore.\n */\nexport interface QuizStoreState {\n /**\n * Map of questions, keyed by id.\n *\n * Unset if the quiz is not yet set.\n */\n readonly questionMap?: Maybe<ReadonlyMap<QuizQuestionId, QuizQuestion>>;\n /**\n * Started quiz\n */\n readonly startedQuiz: boolean;\n /**\n * Questions that have been answered, sorted by index.\n */\n readonly completedQuestions: QuizQuestionIdIndexPair[];\n /**\n * Questions that are remaining to be answered, sorted by index.\n */\n readonly unansweredQuestions: QuizQuestionIdIndexPair[];\n /**\n * Map of current answers.\n */\n readonly answers: ReadonlyMap<QuizQuestionId, QuizAnswer>;\n /**\n * The current index that corresponds with the selected question.\n *\n * If null, defaults to the first question.\n *\n * If greater than the total number of questions, then the quiz is considered complete.\n */\n readonly questionIndex?: Maybe<QuestionIndex>;\n /**\n * If true, the quiz is locked from navigation.\n *\n * Typically used while submitting the quiz.\n */\n readonly lockQuizNavigation?: boolean;\n /**\n * If true, the quiz has been marked as submitted.\n */\n readonly submittedQuiz?: boolean;\n /**\n * The current/active quiz.\n */\n readonly quiz?: Maybe<Quiz>;\n /**\n * If true, allows going back to visit previous questions.\n */\n readonly allowVisitingPreviousQuestion: boolean;\n /**\n * If true, automatically advances to the next question when an answer is set.\n */\n readonly autoAdvanceToNextQuestion: boolean;\n /**\n * Whether or not skipping questions is allowed.\n *\n * Defaults to false.\n */\n readonly allowSkipQuestion: boolean;\n}\n\n/**\n * Lookup input for retrieving an answer by question id, index, or the current question.\n * Provide exactly one of `id`, `index`, or `currentIndex`.\n */\nexport interface QuizStoreAnswerLookupInput extends Partial<QuizQuestionIdIndexPair> {\n readonly currentIndex?: boolean;\n}\n\n/**\n * NgRx ComponentStore that manages quiz lifecycle: question navigation, answer tracking,\n * submission state, and navigation locking.\n *\n * Provided at the component level by `QuizComponent`.\n *\n * @example\n * ```ts\n * // Access from a child component via DI:\n * readonly quizStore = inject(QuizStore);\n * this.quizStore.startQuiz();\n * this.quizStore.updateAnswerForCurrentQuestion(5);\n * ```\n */\n@Injectable()\nexport class QuizStore extends ComponentStore<QuizStoreState> {\n constructor() {\n super({\n quiz: undefined,\n startedQuiz: false,\n submittedQuiz: false,\n answers: new Map(),\n questionIndex: undefined,\n unansweredQuestions: [],\n completedQuestions: [],\n questionMap: undefined,\n autoAdvanceToNextQuestion: true,\n allowVisitingPreviousQuestion: true,\n allowSkipQuestion: false\n });\n }\n\n readonly quiz$ = this.select((state) => state.quiz);\n readonly titleDetails$ = this.quiz$.pipe(map((quiz) => quiz?.titleDetails));\n readonly questions$ = this.quiz$.pipe(map((quiz) => quiz?.questions ?? []));\n readonly startedQuiz$ = this.select((state) => state.startedQuiz);\n readonly lockQuizNavigation$ = this.select((state) => state.lockQuizNavigation);\n readonly submittedQuiz$ = this.select((state) => state.submittedQuiz);\n readonly answers$ = this.select((state) => state.answers);\n readonly questionIndex$ = this.select((state) => state.questionIndex ?? 0);\n readonly completedQuestions$ = this.select((state) => state.completedQuestions);\n readonly unansweredQuestions$ = this.select((state) => state.unansweredQuestions);\n readonly hasAnswerForEachQuestion$ = this.select((state) => state.unansweredQuestions.length === 0);\n readonly isAtEndOfQuestions$ = this.select((state) => (state.questionIndex ?? 0) >= (state.quiz?.questions.length ?? 0));\n\n readonly canGoToPreviousQuestion$ = this.select((state) => !state.lockQuizNavigation && state.allowVisitingPreviousQuestion && state.questionIndex != null && state.questionIndex > 0);\n readonly canGoToNextQuestion$ = this.select((state) => {\n const newQuestionIndex = computeAdvanceIndexOnState(state, 1);\n return !state.lockQuizNavigation && state.questionIndex != null && newQuestionIndex != null && newQuestionIndex > state.questionIndex;\n });\n\n readonly currentQuestion$: Observable<Maybe<QuizQuestionWithIndex>> = combineLatest([this.questions$, this.questionIndex$]).pipe(\n map(([questions, questionIndex]) => {\n const question = questions[questionIndex];\n let result: Maybe<QuizQuestionWithIndex>;\n\n if (question) {\n result = {\n ...question,\n index: questionIndex\n };\n }\n\n return result;\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n /**\n * Returns a reactive observable of the answer for a given question, looked up by id, index, or the current question.\n *\n * @param lookupInput - Lookup criteria specifying which question's answer to retrieve\n * @returns An observable that emits the current answer for the specified question, or undefined if not answered\n *\n * @example\n * ```ts\n * // By current question:\n * store.answerForQuestion({ currentIndex: true }).subscribe(answer => console.log(answer));\n * // By question id:\n * store.answerForQuestion({ id: 'q1' }).subscribe(answer => console.log(answer));\n * ```\n *\n * @param lookupInput - Lookup criteria specifying which question's answer to retrieve\n */\n answerForQuestion(lookupInput: ObservableOrValue<QuizStoreAnswerLookupInput>): Observable<Maybe<QuizAnswer>> {\n return asObservable(lookupInput).pipe(\n switchMap((lookup) => {\n const { id, index, currentIndex } = lookup;\n let result: Observable<Maybe<QuizAnswer>>;\n\n if (currentIndex) {\n result = this.currentQuestion$.pipe(switchMap((question) => this.answerForQuestion({ index: question?.index })));\n } else if (id != null) {\n result = this.answers$.pipe(map((answers) => answers.get(id)));\n } else if (index != null) {\n result = this.questions$.pipe(\n switchMap((questions) => {\n const question = questions[index];\n let result: Observable<Maybe<QuizAnswer>>;\n\n if (question) {\n result = this.answerForQuestion({ id: question.id });\n } else {\n result = of(undefined);\n }\n\n return result;\n })\n );\n } else {\n result = of(undefined);\n }\n\n return result;\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n }\n\n readonly startQuiz = this.updater((state) => startQuizOnState(state));\n readonly setQuiz = this.updater((state, quiz: Maybe<Quiz>) => setQuizOnState(state, quiz));\n\n /**\n * Resets the quiz entirely, back to the pre-quiz state.\n */\n readonly resetQuiz = this.updater((state) => resetQuizOnState(state));\n\n /**\n * Restarts the quiz to the first question.\n */\n readonly restartQuizToFirstQuestion = this.updater((state) => restartQuizToFirstQuestionOnState(state));\n\n readonly setAnswers = this.updater((state, answers: Maybe<QuizAnswer[]>) => setAnswersOnState(state, answers));\n readonly updateAnswers = this.updater((state, answers: Maybe<QuizAnswer[]>) => updateAnswersOnState(state, answers));\n readonly updateAnswerForCurrentQuestion = this.updater((state, answerData: unknown) => updateAnswerForCurrentQuestionOnState(state, answerData));\n readonly setQuestionIndex = this.updater((state, questionIndex: QuestionIndex) => ({ ...state, questionIndex }));\n readonly setAutoAdvanceToNextQuestion = this.updater((state, autoAdvanceToNextQuestion: boolean) => ({ ...state, autoAdvanceToNextQuestion }));\n readonly setAllowSkipQuestion = this.updater((state, allowSkipQuestion: boolean) => ({ ...state, allowSkipQuestion }));\n readonly setAllowVisitingPreviousQuestion = this.updater((state, allowVisitingPreviousQuestion: boolean) => ({ ...state, allowVisitingPreviousQuestion }));\n\n readonly goToNextQuestion = this.updater((state) => advanceQuestionOnState(state, 1));\n readonly goToPreviousQuestion = this.updater((state) => advanceQuestionOnState(state, -1));\n\n readonly setLockQuizNavigation = this.updater((state, lockQuizNavigation: boolean) => ({ ...state, lockQuizNavigation }));\n readonly setSubmittedQuiz = this.updater((state, submittedQuiz: boolean) => ({ ...state, submittedQuiz }));\n}\n\nfunction computeAdvanceIndexOnState(state: QuizStoreState, advancement: number): Maybe<QuestionIndex> {\n const { questionIndex, allowSkipQuestion, unansweredQuestions, lockQuizNavigation } = state;\n const maxQuestionIndex = state.quiz?.questions.length;\n\n let newQuestionIndex: Maybe<QuestionIndex>;\n\n if (maxQuestionIndex != null && questionIndex != null && !lockQuizNavigation) {\n let maxAllowedIndex = maxQuestionIndex;\n\n if (!allowSkipQuestion) {\n maxAllowedIndex = unansweredQuestions[0]?.index ?? maxQuestionIndex;\n }\n\n newQuestionIndex = Math.max(0, Math.min(maxAllowedIndex, questionIndex + advancement));\n }\n\n return newQuestionIndex;\n}\n\nfunction advanceQuestionOnState(state: QuizStoreState, advancement: number): QuizStoreState {\n const newQuestionIndex = computeAdvanceIndexOnState(state, advancement);\n\n let nextState: QuizStoreState = state;\n\n if (newQuestionIndex != null) {\n nextState = {\n ...state,\n questionIndex: newQuestionIndex\n };\n }\n\n return nextState;\n}\n\nfunction startQuizOnState(state: QuizStoreState): QuizStoreState {\n const { startedQuiz } = state;\n let nextState: QuizStoreState = state;\n\n if (!startedQuiz) {\n nextState = {\n ...state,\n startedQuiz: true,\n submittedQuiz: false,\n lockQuizNavigation: false,\n questionIndex: 0\n };\n }\n\n return nextState;\n}\n\nfunction resetQuizOnState(state: QuizStoreState): QuizStoreState {\n return {\n ...restartQuizToFirstQuestionOnState(state),\n startedQuiz: false\n };\n}\n\nfunction restartQuizToFirstQuestionOnState(state: QuizStoreState): QuizStoreState {\n return setAnswersOnState(\n startQuizOnState({\n ...state,\n startedQuiz: false\n }),\n []\n );\n}\n\nfunction setQuizOnState(state: QuizStoreState, quiz?: Maybe<Quiz>): QuizStoreState {\n let questionMap: Maybe<ReadonlyMap<QuizQuestionId, QuizQuestion>> = undefined;\n const currentAnswers = [...state.answers.values()];\n\n if (quiz?.questions) {\n questionMap = new Map(quiz.questions.map((question) => [question.id, question]));\n }\n\n return setAnswersOnState({ ...state, quiz, questionMap }, currentAnswers);\n}\n\nfunction setAnswersOnState(state: QuizStoreState, newAnswers: Maybe<ArrayOrValue<QuizAnswer>>): QuizStoreState {\n return updateAnswersOnState(\n {\n ...state,\n answers: new Map()\n },\n newAnswers\n );\n}\n\nfunction updateAnswerForCurrentQuestionOnState(state: QuizStoreState, answerData: unknown): QuizStoreState {\n const { questionIndex } = state;\n let nextState: Configurable<QuizStoreState> = state;\n\n if (questionIndex != null) {\n const currentQuestion = state.quiz?.questions[questionIndex];\n\n if (currentQuestion) {\n const answer: QuizAnswer = {\n id: currentQuestion.id,\n data: answerData\n };\n\n nextState = updateAnswersOnState(state, [answer]);\n\n if (state.autoAdvanceToNextQuestion) {\n nextState.questionIndex = questionIndex + 1;\n }\n }\n }\n\n return nextState as QuizStoreState;\n}\n\nfunction updateAnswersOnState(state: QuizStoreState, inputAnswers: Maybe<ArrayOrValue<QuizAnswer>>): QuizStoreState {\n const { quiz, answers: currentAnswers } = state;\n\n const answers = new Map(currentAnswers);\n\n asArray(inputAnswers).forEach((answer) => {\n answers.set(answer.id, answer);\n });\n\n const completedQuestions: QuizQuestionIdIndexPair[] = [];\n const unansweredQuestions: QuizQuestionIdIndexPair[] = [];\n\n if (quiz?.questions) {\n quiz.questions.forEach((question, index) => {\n if (answers.has(question.id)) {\n completedQuestions.push({ id: question.id, index });\n } else {\n unansweredQuestions.push({ id: question.id, index });\n }\n });\n }\n\n return { ...state, unansweredQuestions, completedQuestions, answers };\n}\n","import { type Maybe } from '@dereekb/util';\nimport { type Observable, type Subscription } from 'rxjs';\nimport { type QuizQuestion, type QuizAnswer, type Quiz } from './quiz';\nimport { type Provider } from '@angular/core';\nimport { QuizStore } from './quiz.store';\n\n/**\n * Abstract accessor injected into answer/question child components to read the current question\n * and write answers back to the QuizStore without coupling to it directly.\n *\n * Use `provideCurrentQuestionQuizQuestionAccessor()` to bind this to the store's current question.\n */\nexport abstract class QuizQuestionAccessor<T = unknown> {\n /**\n * The active quiz definition.\n */\n abstract readonly quiz$: Observable<Maybe<Quiz>>;\n\n /**\n * The question this accessor is bound to.\n */\n abstract readonly question$: Observable<Maybe<QuizQuestion>>;\n\n /**\n * The current answer for this question, or undefined if unanswered.\n */\n abstract readonly answer$: Observable<Maybe<QuizAnswer<T>>>;\n\n /**\n * Submits an answer value for this question.\n */\n abstract setAnswer(answer: T): void;\n\n /**\n * Binds an observable source whose emissions are forwarded as answer updates.\n */\n abstract setAnswerSource(answer: Observable<T>): Subscription;\n}\n\n/**\n * Provides QuizQuestionAccessor bound to the current question in QuizStore.\n *\n * @returns An Angular provider that binds QuizQuestionAccessor to the current quiz question\n *\n * @usage\n * ```typescript\n * @Component({\n * providers: [QuizStore, provideCurrentQuestionQuizQuestionAccessor()]\n * })\n * ```\n */\nexport function provideCurrentQuestionQuizQuestionAccessor<T = unknown>(): Provider {\n return {\n provide: QuizQuestionAccessor,\n useFactory: (quizStore: QuizStore) => {\n return {\n quiz$: quizStore.quiz$,\n question$: quizStore.currentQuestion$,\n answer$: quizStore.answerForQuestion({ currentIndex: true }),\n setAnswer: (answer: T) => quizStore.updateAnswerForCurrentQuestion(answer),\n setAnswerSource: (answer: Observable<T>) => quizStore.updateAnswerForCurrentQuestion(answer)\n };\n },\n deps: [QuizStore]\n };\n}\n","import { Component, computed, effect, inject, input, type Signal } from '@angular/core';\nimport { QuizStore } from '../store/quiz.store';\nimport { type Maybe } from '@dereekb/util';\nimport { type Quiz } from '../store/quiz';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { combineLatest, first, map, type Observable, switchMap } from 'rxjs';\nimport { DbxInjectionComponent, type DbxInjectionComponentConfig } from '@dereekb/dbx-core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { provideCurrentQuestionQuizQuestionAccessor } from '../store/quiz.accessor';\nimport { DbxButtonModule, DbxWindowKeyDownListenerDirective } from '@dereekb/dbx-web';\n\n/**\n * Lifecycle state of the quiz container view.\n */\nexport type QuizComponentState = 'init' | 'pre-quiz' | 'quiz' | 'post-quiz';\n\n/**\n * Discriminated union of view configs, one per quiz lifecycle state.\n */\nexport type QuizComponentViewConfig = QuizComponentViewInitConfig | QuizComponentViewPreQuizConfig | QuizComponentViewQuizConfig | QuizComponentViewPostQuizConfig;\n\nexport interface QuizComponentViewInitConfig {\n readonly state: 'init';\n}\n\nexport interface QuizComponentViewPreQuizConfig {\n readonly state: 'pre-quiz';\n readonly preQuizComponent?: Maybe<DbxInjectionComponentConfig>;\n}\n\nexport interface QuizComponentViewQuizConfig {\n readonly state: 'quiz';\n readonly questionComponent?: Maybe<DbxInjectionComponentConfig>;\n readonly answerComponent?: Maybe<DbxInjectionComponentConfig>;\n}\n\nexport interface QuizComponentViewPostQuizConfig {\n readonly state: 'post-quiz';\n readonly resultsComponent?: Maybe<DbxInjectionComponentConfig>;\n}\n\n/**\n * Top-level quiz container that orchestrates pre-quiz, active quiz, and post-quiz views.\n *\n * Provides its own `QuizStore` and `QuizQuestionAccessor`, so child components injected via\n * `DbxInjectionComponent` can access quiz state directly through DI.\n *\n * Supports keyboard navigation: Enter (start / next), ArrowLeft (previous), ArrowRight (next).\n *\n * @example\n * ```html\n * <dbx-quiz [quiz]=\"myQuiz\"></dbx-quiz>\n * ```\n */\n@Component({\n selector: 'dbx-quiz',\n templateUrl: './quiz.component.html',\n imports: [DbxInjectionComponent, DbxButtonModule, DbxWindowKeyDownListenerDirective, NgTemplateOutlet],\n providers: [QuizStore, provideCurrentQuestionQuizQuestionAccessor()],\n standalone: true\n})\nexport class QuizComponent {\n readonly quizStore = inject(QuizStore);\n readonly quiz = input.required<Maybe<Quiz>>();\n\n readonly keysFilter = ['Enter', 'ArrowLeft', 'ArrowRight'];\n\n readonly quizEffect = effect(\n () => {\n const quiz = this.quiz();\n this.quizStore.setQuiz(quiz);\n },\n { allowSignalWrites: true }\n );\n\n readonly quiz$ = toObservable(this.quiz);\n readonly quizTitleSignal = computed(() => this.quiz()?.titleDetails.title);\n\n readonly currentQuestionSignal = toSignal(this.quizStore.currentQuestion$);\n\n readonly questionTitleSignal = computed(() => {\n const currentQuestion = this.currentQuestionSignal();\n return currentQuestion ? `Question ${currentQuestion.index + 1}` : '';\n });\n\n readonly startedQuiz$ = this.quizStore.startedQuiz$;\n readonly currentQuestion$ = this.quizStore.currentQuestion$;\n\n readonly canGoToPreviousQuestionSignal: Signal<boolean> = toSignal(this.quizStore.canGoToPreviousQuestion$, { initialValue: false });\n readonly canGoToNextQuestionSignal: Signal<boolean> = toSignal(this.quizStore.canGoToNextQuestion$, { initialValue: false });\n\n readonly viewConfig$: Observable<QuizComponentViewConfig> = this.startedQuiz$.pipe(\n switchMap((started) => {\n if (!started) {\n return this.quiz$.pipe(\n map((quiz) => {\n const viewConfig: QuizComponentViewPreQuizConfig = {\n state: 'pre-quiz',\n preQuizComponent: quiz?.preQuizComponentConfig\n };\n\n return viewConfig;\n })\n );\n } else {\n return combineLatest([this.quiz$, this.currentQuestion$, this.quizStore.isAtEndOfQuestions$]).pipe(\n map(([quiz, currentQuestion, isAtEndOfQuestions]) => {\n let viewConfig: QuizComponentViewConfig;\n\n if (isAtEndOfQuestions) {\n viewConfig = {\n state: 'post-quiz',\n resultsComponent: quiz?.resultsComponentConfig\n };\n } else {\n viewConfig = {\n state: 'quiz',\n questionComponent: currentQuestion?.questionComponentConfig,\n answerComponent: currentQuestion?.answerComponentConfig\n };\n }\n\n return viewConfig;\n })\n );\n }\n })\n );\n\n readonly viewConfigSignal: Signal<QuizComponentViewConfig> = toSignal(this.viewConfig$, { initialValue: { state: 'init' } as QuizComponentViewConfig });\n readonly viewStateSignal: Signal<QuizComponentState> = computed(() => this.viewConfigSignal()?.state ?? 'init');\n\n readonly preQuizComponentConfigSignal: Signal<Maybe<DbxInjectionComponentConfig>> = computed(() => (this.viewConfigSignal() as QuizComponentViewPreQuizConfig)?.preQuizComponent);\n readonly questionComponentConfigSignal: Signal<Maybe<DbxInjectionComponentConfig>> = computed(() => (this.viewConfigSignal() as QuizComponentViewQuizConfig)?.questionComponent);\n readonly answerComponentConfigSignal: Signal<Maybe<DbxInjectionComponentConfig>> = computed(() => (this.viewConfigSignal() as QuizComponentViewQuizConfig)?.answerComponent);\n readonly resultsComponentConfigSignal: Signal<Maybe<DbxInjectionComponentConfig>> = computed(() => (this.viewConfigSignal() as QuizComponentViewPostQuizConfig)?.resultsComponent);\n\n handleKeyDown(event: KeyboardEvent) {\n const code = event.code;\n\n switch (code) {\n case 'Enter':\n this.quizStore.startedQuiz$.pipe(first()).subscribe((started) => {\n if (!started) {\n this.quizStore.startQuiz();\n } else {\n this.clickNextQuestion();\n }\n });\n break;\n case 'ArrowLeft':\n this.clickPreviousQuestion();\n break;\n case 'ArrowRight':\n this.clickNextQuestion();\n break;\n }\n }\n\n clickPreviousQuestion() {\n this.quizStore.goToPreviousQuestion();\n }\n\n clickNextQuestion() {\n this.quizStore.goToNextQuestion();\n }\n}\n","<div class=\"dbx-quiz\" (dbxWindowKeyDownListener)=\"handleKeyDown($event)\" [dbxWindowKeyDownFilter]=\"keysFilter\">\n @switch (viewStateSignal()) {\n @case ('pre-quiz') {\n <ng-container *ngTemplateOutlet=\"preQuizTemplate\"></ng-container>\n }\n @case ('quiz') {\n <ng-container *ngTemplateOutlet=\"quizTemplate\"></ng-container>\n }\n @case ('post-quiz') {\n <ng-container *ngTemplateOutlet=\"postQuizTemplate\"></ng-container>\n }\n }\n</div>\n\n<!-- Pre-Quiz -->\n<ng-template #preQuizTemplate>\n <div class=\"dbx-quiz-pre-quiz\">\n <dbx-injection [config]=\"preQuizComponentConfigSignal()\"></dbx-injection>\n </div>\n</ng-template>\n\n<!-- Quiz -->\n<ng-template #quizTemplate>\n <div class=\"dbx-quiz-quiz\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n <div class=\"dbx-quiz-question dbx-pb3\">\n <h4 class=\"dbx-quiz-question-title\">{{ questionTitleSignal() }}</h4>\n <dbx-injection [config]=\"questionComponentConfigSignal()\"></dbx-injection>\n </div>\n <div class=\"dbx-quiz-answer dbx-pt3\">\n <dbx-injection [config]=\"answerComponentConfigSignal()\"></dbx-injection>\n </div>\n </div>\n</ng-template>\n\n<!-- Post-Quiz -->\n<ng-template #postQuizTemplate>\n <div class=\"dbx-quiz-post-quiz\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n <dbx-injection [config]=\"resultsComponentConfigSignal()\"></dbx-injection>\n </div>\n</ng-template>\n\n<!-- Header Template -->\n<ng-template #headerTemplate>\n <div class=\"dbx-quiz-header\">\n <div class=\"dbx-flex-group\">\n <dbx-button [disabled]=\"!canGoToPreviousQuestionSignal()\" icon=\"arrow_back\" (buttonClick)=\"clickPreviousQuestion()\"></dbx-button>\n <span class=\"spacer\"></span>\n <span class=\"mat-h2\">{{ quizTitleSignal() }}</span>\n <span class=\"spacer\"></span>\n <dbx-button [disabled]=\"!canGoToNextQuestionSignal()\" icon=\"arrow_forward\" (buttonClick)=\"clickNextQuestion()\"></dbx-button>\n </div>\n </div>\n</ng-template>\n","import { Component, computed, inject, model } from '@angular/core';\nimport { DbxButtonModule, DbxWindowKeyDownListenerDirective } from '@dereekb/dbx-web';\nimport { QuizQuestionAccessor } from '../store/quiz.accessor';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { type Maybe, range, type RangeInput } from '@dereekb/util';\n\n/**\n * Named preset for common number ranges.\n */\nexport type QuizAnswerNumberComponentPreset = 'oneToFive';\n\n/**\n * Configuration for the number answer component. Provide a preset, explicit range, or arbitrary numbers.\n */\nexport interface QuizAnswerNumberComponentConfig {\n /**\n * Uses a preset to compute the range/numbers.\n */\n readonly preset?: QuizAnswerNumberComponentPreset;\n /**\n * Range configuration\n */\n readonly range?: RangeInput;\n /**\n * Arbitrary array of numbers\n */\n readonly numbers?: number[];\n}\n\ninterface QuizAnswerNumberChoice {\n readonly number: number;\n readonly selected?: boolean;\n}\n\n/**\n * Answer component that displays configurable number buttons.\n *\n * @usage\n * Used as an answer component in a QuizQuestion's answerComponentConfig.\n * Defaults to 1-5 range if no config is provided.\n *\n * ```typescript\n * answerComponentConfig: {\n * componentClass: QuizAnswerNumberComponent,\n * init: (instance: QuizAnswerNumberComponent) => {\n * instance.config.set({ range: { start: 1, end: 11 } });\n * }\n * }\n * ```\n */\n@Component({\n templateUrl: './quiz.answer.number.component.html',\n imports: [DbxButtonModule, DbxWindowKeyDownListenerDirective],\n standalone: true\n})\nexport class QuizAnswerNumberComponent {\n readonly questionAccessor = inject<QuizQuestionAccessor<number>>(QuizQuestionAccessor);\n\n readonly config = model<Maybe<QuizAnswerNumberComponentConfig>>();\n\n readonly currentAnswerSignal = toSignal(this.questionAccessor.answer$);\n readonly currentAnswerValueSignal = computed(() => this.currentAnswerSignal()?.data);\n\n readonly choicesSignal = computed(() => {\n const { range: inputRange, numbers: inputNumbers, preset } = this.config() ?? { preset: 'oneToFive' };\n const currentAnswer = this.currentAnswerValueSignal();\n\n let useRange: Maybe<RangeInput>;\n let useNumbers: Maybe<number[]>;\n\n if (preset) {\n switch (preset) {\n case 'oneToFive':\n default:\n useRange = { start: 1, end: 6 };\n break;\n }\n } else if (inputRange) {\n useRange = inputRange;\n } else if (inputNumbers) {\n useNumbers = inputNumbers;\n }\n\n let numbers: number[];\n\n if (useRange) {\n numbers = range(useRange);\n } else if (useNumbers) {\n numbers = useNumbers ?? [];\n } else {\n numbers = [];\n }\n\n const choices: QuizAnswerNumberChoice[] = numbers.map((number) => {\n return {\n number,\n selected: currentAnswer === number\n };\n });\n\n return choices;\n });\n\n readonly relevantKeysSignal = computed<string[]>(() => {\n const choices = this.choicesSignal();\n return choices.map((choice) => choice.number.toString());\n });\n\n clickedAnswer(answer: number) {\n this.questionAccessor.setAnswer(answer);\n }\n\n handleKeyDown(event: KeyboardEvent) {\n const number = Number(event.key);\n if (!isNaN(number)) {\n this.clickedAnswer(number);\n }\n }\n}\n","<div class=\"dbx-quiz-answer-number\" (dbxWindowKeyDownListener)=\"handleKeyDown($event)\" [dbxWindowKeyDownFilter]=\"relevantKeysSignal()\">\n <div class=\"dbx-quiz-answer-number-buttons dbx-button-wrap-group\" role=\"radiogroup\" aria-label=\"Answer choices\">\n @for (choice of choicesSignal(); track choice.number) {\n <dbx-button role=\"radio\" [attr.aria-checked]=\"choice.selected\" [attr.aria-label]=\"'' + choice.number\" [color]=\"choice.selected ? 'accent' : 'primary'\" [raised]=\"true\" (buttonClick)=\"clickedAnswer(choice.number)\">{{ choice.number }}</dbx-button>\n }\n </div>\n</div>\n","import { Component, computed, inject, model } from '@angular/core';\nimport { DbxButtonModule, DbxWindowKeyDownListenerDirective } from '@dereekb/dbx-web';\nimport { type Maybe, range } from '@dereekb/util';\nimport { QuizQuestionAccessor } from '../store/quiz.accessor';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\nconst MULTIPLE_CHOICE_LETTERS = `abcdefghijklmnopqrstuvwxyz`;\n\n/**\n * Upper-case letter label for a multiple choice option (e.g. \"A\", \"B\").\n */\nexport type MultipleChoiceLetter = string;\n\n/**\n * Display text for a single multiple choice option.\n */\nexport type MultipleChoiceText = string;\n\n/**\n * Answer data stored when a multiple choice option is selected.\n */\nexport interface MultipleChoiceAnswer {\n readonly isCorrectAnswer: boolean;\n readonly letter: MultipleChoiceLetter;\n readonly text: MultipleChoiceText;\n}\n\n/**\n * Configuration for the multiple choice answer component.\n */\nexport interface QuizAnswerMultipleChoiceComponentConfig {\n /**\n * Ordered list of answer option texts. Letters are auto-assigned A, B, C, etc.\n */\n readonly answerText: readonly MultipleChoiceText[];\n /**\n * Zero-based index of the correct answer, used to set `isCorrectAnswer` on the stored answer.\n */\n readonly correctAnswerIndex?: number;\n}\n\ninterface QuizAnswerMultipleChoice extends MultipleChoiceAnswer {\n readonly selected?: boolean;\n}\n\n/**\n * Answer component that displays multiple choice letter-labeled buttons.\n *\n * @usage\n * Used as an answer component in a QuizQuestion's answerComponentConfig.\n * Supports keyboard shortcuts (pressing the letter key selects that answer).\n *\n * ```typescript\n * answerComponentConfig: {\n * componentClass: QuizAnswerMultipleChoiceComponent,\n * init: (instance: QuizAnswerMultipleChoiceComponent) => {\n * instance.config.set({\n * answerText: ['Option A', 'Option B', 'Option C'],\n * correctAnswerIndex: 1\n * });\n * }\n * }\n * ```\n */\n@Component({\n templateUrl: './quiz.answer.multiplechoice.component.html',\n imports: [DbxButtonModule, DbxWindowKeyDownListenerDirective],\n standalone: true\n})\nexport class QuizAnswerMultipleChoiceComponent {\n readonly questionAccessor = inject<QuizQuestionAccessor<QuizAnswerMultipleChoice>>(QuizQuestionAccessor);\n\n readonly config = model<Maybe<QuizAnswerMultipleChoiceComponentConfig>>();\n\n readonly currentAnswerSignal = toSignal(this.questionAccessor.answer$);\n readonly currentAnswerValueSignal = computed(() => this.currentAnswerSignal()?.data);\n\n readonly choicesSignal = computed(() => {\n const config = this.config();\n\n const currentAnswer = this.currentAnswerValueSignal();\n const answers = config?.answerText ?? [];\n const correctAnswerIndex = config?.correctAnswerIndex;\n\n const choices: QuizAnswerMultipleChoice[] = answers.map((text, i) => {\n const letter = MULTIPLE_CHOICE_LETTERS[i];\n\n return {\n letter: MULTIPLE_CHOICE_LETTERS[i].toUpperCase(),\n text,\n selected: currentAnswer?.letter === letter,\n isCorrectAnswer: correctAnswerIndex === i\n };\n });\n\n return choices;\n });\n\n readonly relevantKeysSignal = computed<string[]>(() => {\n const answersCount = this.config()?.answerText.length ?? 0;\n const relevantKeys = [];\n\n const numbersRange = answersCount > 0 ? range(1, answersCount + 1) : [];\n\n for (const number of numbersRange) {\n const answerLetter = MULTIPLE_CHOICE_LETTERS[number - 1];\n relevantKeys.push(answerLetter);\n }\n\n return relevantKeys;\n });\n\n clickedAnswer(answer: QuizAnswerMultipleChoice) {\n this.questionAccessor.setAnswer(answer);\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (event.key.length === 1) {\n const choices = this.choicesSignal();\n const selectedLetter = event.key.toUpperCase();\n const choice = choices.find((x) => x.letter === selectedLetter);\n\n if (choice) {\n this.clickedAnswer(choice);\n }\n }\n }\n}\n","<div class=\"dbx-quiz-answer-multiplechoice\" (dbxWindowKeyDownListener)=\"handleKeyDown($event)\" [dbxWindowKeyDownFilter]=\"relevantKeysSignal()\">\n <div class=\"dbx-quiz-answer-multiplechoice-buttons dbx-button-column dbx-button-wide\" role=\"radiogroup\" aria-label=\"Answer choices\">\n @for (choice of choicesSignal(); track choice.letter) {\n <dbx-button class=\"dbx-w100\" role=\"radio\" [attr.aria-checked]=\"choice.selected\" [attr.aria-label]=\"choice.letter + ') ' + choice.text\" [color]=\"choice.selected ? 'accent' : 'primary'\" [raised]=\"true\" (buttonClick)=\"clickedAnswer(choice)\">\n <div class=\"dbx-quiz-answer-multiplechoice-button-content\">\n <span class=\"dbx-quiz-answer-multiplechoice-button-letter\">{{ choice.letter }})</span>\n <span class=\"dbx-quiz-answer-multiplechoice-button-text\">{{ choice.text }}</span>\n </div>\n </dbx-button>\n }\n </div>\n</div>\n","import { Component, computed, inject, model } from '@angular/core';\nimport { QuizStore } from '../store/quiz.store';\nimport { DbxButtonModule } from '@dereekb/dbx-web';\nimport { type Maybe, type MaybeMap } from '@dereekb/util';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { type QuizTitleDetails } from '../store/quiz';\n\n/**\n * Config for the pre-quiz intro component.\n *\n * Overrides the title details.\n */\nexport type QuizPreQuizIntroConfig = Partial<MaybeMap<QuizTitleDetails>>;\n\n/**\n * Pre-quiz intro component that displays the quiz title, subtitle, description, and a start button.\n *\n * @usage\n * Used as a preQuizComponentConfig in a Quiz definition.\n * Inherits title details from the quiz unless overridden via config.\n *\n * ```typescript\n * preQuizComponentConfig: {\n * componentClass: QuizPreQuizIntroComponent,\n * init: (instance: QuizPreQuizIntroComponent) => {\n * instance.config.set({ subtitle: 'Custom subtitle' });\n * }\n * }\n * ```\n */\n@Component({\n templateUrl: './quiz.prequiz.intro.component.html',\n imports: [DbxButtonModule],\n standalone: true\n})\nexport class QuizPreQuizIntroComponent {\n readonly quizStore = inject(QuizStore);\n\n readonly config = model<Maybe<QuizPreQuizIntroConfig>>();\n readonly quizTitleDetailsSignal = toSignal(this.quizStore.titleDetails$);\n\n readonly configSignal = computed(() => {\n const config = this.config();\n const titleDetails = this.quizTitleDetailsSignal();\n\n return {\n title: config?.title ?? titleDetails?.title,\n subtitle: config?.subtitle ?? titleDetails?.subtitle,\n description: config?.description ?? titleDetails?.description\n };\n });\n\n readonly titleSignal = computed(() => this.configSignal()?.title);\n readonly subtitleSignal = computed(() => this.configSignal()?.subtitle);\n readonly descriptionSignal = computed(() => this.configSignal()?.description);\n}\n","<div>\n <div>\n <h1>{{ titleSignal() }}</h1>\n <h2>{{ subtitleSignal() }}</h2>\n <p>{{ descriptionSignal() }}</p>\n </div>\n <div>\n <dbx-button [raised]=\"true\" (buttonClick)=\"quizStore.startQuiz()\" text=\"Start Quiz\"></dbx-button>\n </div>\n</div>\n","import { Component, computed, model } from '@angular/core';\nimport { type Maybe } from '@dereekb/util';\n\n/**\n * Configuration for the text-based question display. Used with `quizAgreementPrompt()` and\n * `quizFrequencyPrompt()` helpers for Likert-scale questions.\n */\nexport interface QuizQuestionTextComponentConfig {\n /**\n * Instructional prompt displayed above the main text (e.g. \"Rate how much you agree:\").\n */\n readonly prompt?: string;\n /**\n * The primary question or statement text.\n */\n readonly text: string;\n /**\n * Scale guidance displayed below the text (e.g. \"1 = Strongly Disagree, 5 = Strongly Agree\").\n */\n readonly guidance?: string;\n}\n\n/**\n * Question component that displays text with optional prompt and guidance.\n *\n * @usage\n * Used as a questionComponentConfig in a QuizQuestion definition.\n *\n * ```typescript\n * questionComponentConfig: {\n * componentClass: QuizQuestionTextComponent,\n * init: (instance: QuizQuestionTextComponent) => {\n * instance.config.set({ text: 'How do you handle ambiguity?', prompt: 'Rate yourself:', guidance: '1=Never, 5=Always' });\n * }\n * }\n * ```\n */\n@Component({\n templateUrl: './quiz.question.text.component.html',\n standalone: true\n})\nexport class QuizQuestionTextComponent {\n readonly config = model<Maybe<QuizQuestionTextComponentConfig>>();\n\n readonly promptSignal = computed(() => this.config()?.prompt);\n readonly textSignal = computed(() => this.config()?.text);\n readonly guidanceSignal = computed(() => this.config()?.guidance);\n}\n","<div class=\"dbx-quiz-question-text\" role=\"group\" aria-label=\"Question\">\n <div class=\"dbx-quiz-question-text-content\">\n @if (promptSignal() !== null) {\n <div class=\"dbx-hint dbx-pb3\" aria-label=\"Prompt\">{{ promptSignal() }}</div>\n }\n <div class=\"dbx-pb3\">{{ textSignal() }}</div>\n @if (guidanceSignal() !== null) {\n <div class=\"dbx-small dbx-hint\" role=\"note\">{{ guidanceSignal() }}</div>\n }\n </div>\n</div>\n","import { Component, computed, inject, input } from '@angular/core';\nimport { DbxActionModule, DbxButtonModule } from '@dereekb/dbx-web';\nimport { QuizStore } from '../store/quiz.store';\nimport { type Work } from '@dereekb/rxjs';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { type DbxActionSuccessHandlerFunction } from '@dereekb/dbx-core';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * Submission lifecycle state within the post-quiz view.\n */\nexport type DbxQuizPostQuizState = 'presubmit' | 'postsubmit';\n\n/**\n * Post-quiz component that handles quiz submission and displays pre/post submit content.\n *\n * @usage\n * Use as a wrapper in your results component template:\n *\n * ```html\n * <dbx-quiz-post-quiz [handleSubmitQuiz]=\"handleSubmitQuiz\">\n * <div presubmit>Pre-submit content...</div>\n * <div postsubmit>Post-submit content (scores, etc.)...</div>\n * </dbx-quiz-post-quiz>\n * ```\n */\n@Component({\n selector: 'dbx-quiz-post-quiz',\n templateUrl: './quiz.postquiz.component.html',\n imports: [DbxButtonModule, DbxActionModule, NgTemplateOutlet],\n standalone: true\n})\nexport class DbxQuizPostQuizComponent {\n readonly quizStore = inject(QuizStore);\n\n readonly quizSubmittedSignal = toSignal(this.quizStore.submittedQuiz$);\n\n readonly stateSignal = computed(() => {\n const submitted = this.quizSubmittedSignal();\n\n if (submitted) {\n return 'postsubmit';\n } else {\n return 'presubmit';\n }\n });\n\n readonly handleSubmitQuiz = input<Work<void>>();\n\n readonly handleSubmitQuizButton: Work<void> = (_, context) => {\n this.quizStore.setLockQuizNavigation(true);\n const handler = this.handleSubmitQuiz();\n\n if (handler) {\n return handler(_, context);\n } else {\n context.reject();\n }\n };\n\n readonly handleSubmitQuizSuccess: DbxActionSuccessHandlerFunction = () => {\n this.quizStore.setSubmittedQuiz(true);\n };\n}\n","<div class=\"dbx-post-quiz text-center\" role=\"status\" aria-live=\"polite\">\n <h3>Quiz Completed</h3>\n <div>\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n @if (stateSignal() === 'presubmit') {\n <ng-container *ngTemplateOutlet=\"preSubmitTemplate\"></ng-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"postSubmitTemplate\"></ng-container>\n }\n </div>\n</div>\n\n<!-- Pre-Submit -->\n<ng-template #preSubmitTemplate>\n <ng-content select=\"[presubmit]\"></ng-content>\n @if (handleSubmitQuiz()) {\n <div class=\"dbx-post-quiz-submit\">\n <div dbxAction dbxActionLogger dbxActionValue dbxActionSnackbarError [dbxActionHandler]=\"handleSubmitQuizButton\" [dbxActionSuccessHandler]=\"handleSubmitQuizSuccess\">\n <dbx-button [disabled]=\"quizSubmittedSignal()\" [raised]=\"true\" dbxActionButton>Submit Quiz</dbx-button>\n </div>\n </div>\n }\n</ng-template>\n\n<!-- Post-Submit -->\n<ng-template #postSubmitTemplate>\n <ng-content select=\"[postsubmit]\"></ng-content>\n</ng-template>\n\n<!-- Content -->\n<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n","import { Component, inject, input } from '@angular/core';\nimport { DbxActionModule, DbxButtonModule } from '@dereekb/dbx-web';\nimport { QuizStore } from '../store/quiz.store';\nimport { type Work } from '@dereekb/rxjs';\n\n/**\n * Button component that restarts the quiz to the first question.\n *\n * @usage\n * ```html\n * <dbx-quiz-reset-button buttonText=\"Try Again\"></dbx-quiz-reset-button>\n * ```\n */\n@Component({\n selector: 'dbx-quiz-reset-button',\n template: `\n <div class=\"dbx-quiz-reset-button\">\n <div dbxAction dbxActionLogger dbxActionValue dbxActionSnackbarError [dbxActionHandler]=\"handleResetQuizButton\">\n <dbx-button [raised]=\"true\" [text]=\"buttonText()\" dbxActionButton></dbx-button>\n </div>\n </div>\n `,\n imports: [DbxButtonModule, DbxActionModule],\n standalone: true\n})\nexport class DbxQuizResetButtonComponent {\n readonly quizStore = inject(QuizStore);\n\n readonly buttonText = input<string>(`Restart Quiz`);\n\n readonly handleResetQuizButton: Work<void> = (_, context) => {\n this.quizStore.restartQuizToFirstQuestion();\n context.success();\n };\n}\n","import { Component, computed, input } from '@angular/core';\nimport { type Maybe } from '@dereekb/util';\nimport { DbxQuizResetButtonComponent } from './quiz.reset.button.component';\n\n/**\n * Input data for rendering the quiz score display.\n */\nexport interface DbxQuizScoreInput {\n /**\n * Whether to show the retake/reset button.\n */\n readonly showRetakeButton?: boolean;\n /**\n * Feedback text to display.\n */\n readonly feedbackText: string;\n /**\n * Optional subtitle text.\n */\n readonly subtitle?: Maybe<string>;\n /**\n * The score achieved.\n */\n readonly score: number;\n /**\n * The maximum possible score.\n */\n readonly maxScore: number;\n}\n\n/**\n * Generic quiz score display component.\n *\n * @usage\n * ```html\n * <dbx-quiz-score [input]=\"scoreInput\"></dbx-quiz-score>\n * ```\n */\n@Component({\n selector: 'dbx-quiz-score',\n template: `\n <div class=\"dbx-quiz-score\">\n <h3 class=\"dbx-quiz-score-score\">{{ scoreSignal() }}/{{ maxScoreSignal() }}</h3>\n <p class=\"dbx-quiz-score-text\">{{ feedbackTextSignal() }}</p>\n @if (subtitleSignal()) {\n <p class=\"dbx-quiz-score-subtitle\">{{ subtitleSignal() }}</p>\n }\n @if (showRetakeButtonSignal()) {\n <dbx-quiz-reset-button buttonText=\"Retake Quiz\"></dbx-quiz-reset-button>\n }\n </div>\n `,\n imports: [DbxQuizResetButtonComponent],\n standalone: true\n})\nexport class DbxQuizScoreComponent {\n readonly input = input<Maybe<DbxQuizScoreInput>>();\n\n readonly scoreSignal = computed(() => this.input()?.score);\n readonly maxScoreSignal = computed(() => this.input()?.maxScore);\n readonly feedbackTextSignal = computed(() => this.input()?.feedbackText ?? '');\n readonly subtitleSignal = computed(() => this.input()?.subtitle);\n readonly showRetakeButtonSignal = computed(() => this.input()?.showRetakeButton);\n}\n","import { type QuizQuestionTextComponentConfig } from './component/quiz.question.text.component';\n\n/**\n * Creates a Likert scale question config with agreement prompt (Strongly Disagree to Strongly Agree).\n *\n * @param text - The statement to rate agreement on\n * @returns A quiz question config with an agreement-based prompt and guidance text\n *\n * @example\n * ```ts\n * instance.config.set(quizAgreementPrompt('I feel confident leading under pressure.'));\n * // { prompt: 'Please rate how much you agree...', text: '...', guidance: '1 = Strongly Disagree, 5 = Strongly Agree' }\n * ```\n *\n * @param text - The statement to rate agreement on\n */\nexport function quizAgreementPrompt(text: string): QuizQuestionTextComponentConfig {\n return {\n prompt: 'Please rate how much you agree with the following statement:',\n text,\n guidance: '1 = Strongly Disagree, 5 = Strongly Agree'\n };\n}\n\n/**\n * Creates a Likert scale question config with frequency prompt (Never to Always).\n *\n * @param text - The statement to rate frequency on\n * @returns A quiz question config with a frequency-based prompt and guidance text\n *\n * @example\n * ```ts\n * instance.config.set(quizFrequencyPrompt('I break vague direction into first steps.'));\n * // { prompt: 'Please rate how much you agree...', text: '...', guidance: '1 = Never, 5 = Always' }\n * ```\n *\n * @param text - The statement to rate frequency on\n */\nexport function quizFrequencyPrompt(text: string): QuizQuestionTextComponentConfig {\n return {\n prompt: 'Please rate how much you agree with the following statement:',\n text,\n guidance: '1 = Never, 5 = Always'\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;AA+EA;;;;;;;;;;;;;AAaG;AAEG,MAAO,SAAU,SAAQ,cAA8B,CAAA;AAC3D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,CAAC;AACJ,YAAA,IAAI,EA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5CA;;AAEG;;;;"}
@@ -807,7 +807,7 @@ class DbxFormActionDialogComponent extends AbstractDialogDirective {
807
807
  <dbx-button dbxActionButton [buttonDisplay]="submitButtonConfig" [buttonStyle]="submitButtonConfig" [raised]="true"></dbx-button>
808
808
  </div>
809
809
  </dbx-dialog-content>
810
- `, isInline: true, dependencies: [{ kind: "directive", type: DbxDialogContentDirective, selector: "dbx-dialog-content,[dbxDialogContent],.dbx-dialog-content", inputs: ["width"] }, { kind: "ngmodule", type: DbxActionModule }, { kind: "directive", type: i2.DbxActionDirective, selector: "dbx-action,[dbxAction]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i2.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "ngmodule", type: DbxButtonModule }, { kind: "component", type: i1$2.DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "allowClickPropagation", "mode"] }, { kind: "component", type: DbxDialogContentCloseComponent, selector: "dbx-dialog-content-close", inputs: ["padded"], outputs: ["close"] }, { kind: "component", type: DbxFormlyComponent, selector: "dbx-formly", exportAs: ["formly"] }, { kind: "directive", type: DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: ["dbxFormSourceMode", "dbxFormSource"] }, { kind: "directive", type: DbxActionFormDirective, selector: "[dbxActionForm]", inputs: ["dbxActionFormDisabledOnWorking", "dbxActionFormIsValid", "dbxActionFormIsEqual", "dbxActionFormIsModified", "dbxActionFormMapValue"] }] });
810
+ `, isInline: true, dependencies: [{ kind: "directive", type: DbxDialogContentDirective, selector: "dbx-dialog-content,[dbxDialogContent],.dbx-dialog-content", inputs: ["width"] }, { kind: "ngmodule", type: DbxActionModule }, { kind: "directive", type: i2.DbxActionDirective, selector: "dbx-action,[dbxAction]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i2.DbxActionButtonDirective, selector: "[dbxActionButton]", inputs: ["dbxActionButtonEcho"] }, { kind: "ngmodule", type: DbxButtonModule }, { kind: "component", type: i1$2.DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "allowClickPropagation", "mode"] }, { kind: "component", type: DbxDialogContentCloseComponent, selector: "dbx-dialog-content-close", inputs: ["padded"], outputs: ["close"] }, { kind: "component", type: DbxFormlyComponent, selector: "dbx-formly", exportAs: ["formly"] }, { kind: "directive", type: DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: ["dbxFormSourceMode", "dbxFormSource"] }, { kind: "directive", type: DbxActionFormDirective, selector: "[dbxActionForm]", inputs: ["dbxActionFormDisabledOnWorking", "dbxActionFormIsValid", "dbxActionFormIsEqual", "dbxActionFormIsModified", "dbxActionFormMapValue"] }] });
811
811
  }
812
812
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxFormActionDialogComponent, decorators: [{
813
813
  type: Component,
@@ -3864,7 +3864,7 @@ class DbxFormSourceSelectFieldComponent extends FieldType$2 {
3864
3864
  this.formControl.markAsTouched();
3865
3865
  }
3866
3866
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxFormSourceSelectFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3867
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: DbxFormSourceSelectFieldComponent, isStandalone: true, selector: "dbx-form-sourceselectfield", viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "filterInputElement", first: true, predicate: ["filterInput"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-source-select-field\">\n <div class=\"dbx-source-select-field-content\">\n <mat-select class=\"dbx-source-select-field-select\" [id]=\"id\" [formControl]=\"formControl\" [multiple]=\"props.multiple\" [panelClass]=\"selectPanelClass\" (openedChange)=\"onSelectOpenedChange($event)\">\n @if (filterable) {\n <div class=\"dbx-source-select-filter-container\">\n <input #filterInput class=\"dbx-source-select-filter-input\" type=\"text\" placeholder=\"Type to filter...\" (input)=\"onFilterInput($event)\" (keydown)=\"onFilterKeydown($event)\" />\n </div>\n }\n @for (value of filteredNonGroupedValuesSignal(); track value.value) {\n <mat-option [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n }\n @for (optionGroup of filteredGroupedOptionsSignal(); track optionGroup.label) {\n <mat-optgroup [label]=\"optionGroup.label\">\n @for (value of optionGroup.values; track value.value) {\n <mat-option [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n }\n </mat-optgroup>\n }\n </mat-select>\n @if (showOpenSourceButton) {\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-action dbxActionValue [dbxActionHandler]=\"handleSelectOptions\" class=\"dbx-source-select-field-button\">\n <dbx-button #button dbxActionButton [fab]=\"true\" [iconOnly]=\"true\" [icon]=\"selectButtonIcon\"></dbx-button>\n </dbx-action>\n }\n </div>\n <dbx-loading class=\"dbx-source-select-field-loading\" [linear]=\"true\" [context]=\"context\"></dbx-loading>\n</div>\n", dependencies: [{ kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "allowClickPropagation", "mode"] }, { kind: "component", type: MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "ngmodule", type: DbxActionModule }, { kind: "directive", type: i2.DbxActionDirective, selector: "dbx-action,[dbxAction]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i2.DbxActionValueDirective, selector: "dbxActionValue,[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i2.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: DbxLoadingComponent, selector: "dbx-loading", inputs: ["padding", "show", "text", "mode", "color", "diameter", "linear", "loading", "error", "context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3867
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: DbxFormSourceSelectFieldComponent, isStandalone: true, selector: "dbx-form-sourceselectfield", viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "filterInputElement", first: true, predicate: ["filterInput"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-source-select-field\">\n <div class=\"dbx-source-select-field-content\">\n <mat-select class=\"dbx-source-select-field-select\" [id]=\"id\" [formControl]=\"formControl\" [multiple]=\"props.multiple\" [panelClass]=\"selectPanelClass\" (openedChange)=\"onSelectOpenedChange($event)\">\n @if (filterable) {\n <div class=\"dbx-source-select-filter-container\">\n <input #filterInput class=\"dbx-source-select-filter-input\" type=\"text\" placeholder=\"Type to filter...\" (input)=\"onFilterInput($event)\" (keydown)=\"onFilterKeydown($event)\" />\n </div>\n }\n @for (value of filteredNonGroupedValuesSignal(); track value.value) {\n <mat-option [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n }\n @for (optionGroup of filteredGroupedOptionsSignal(); track optionGroup.label) {\n <mat-optgroup [label]=\"optionGroup.label\">\n @for (value of optionGroup.values; track value.value) {\n <mat-option [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n }\n </mat-optgroup>\n }\n </mat-select>\n @if (showOpenSourceButton) {\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-action dbxActionValue [dbxActionHandler]=\"handleSelectOptions\" class=\"dbx-source-select-field-button\">\n <dbx-button #button dbxActionButton [fab]=\"true\" [iconOnly]=\"true\" [icon]=\"selectButtonIcon\"></dbx-button>\n </dbx-action>\n }\n </div>\n <dbx-loading class=\"dbx-source-select-field-loading\" [linear]=\"true\" [context]=\"context\"></dbx-loading>\n</div>\n", dependencies: [{ kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "allowClickPropagation", "mode"] }, { kind: "component", type: MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "ngmodule", type: DbxActionModule }, { kind: "directive", type: i2.DbxActionDirective, selector: "dbx-action,[dbxAction]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i2.DbxActionValueDirective, selector: "dbxActionValue,[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i2.DbxActionButtonDirective, selector: "[dbxActionButton]", inputs: ["dbxActionButtonEcho"] }, { kind: "component", type: DbxLoadingComponent, selector: "dbx-loading", inputs: ["padding", "show", "text", "mode", "color", "diameter", "linear", "loading", "error", "context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3868
3868
  }
3869
3869
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxFormSourceSelectFieldComponent, decorators: [{
3870
3870
  type: Component,