@dereekb/dbx-form 13.40.0 → 13.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -192,7 +192,7 @@ function restartQuizToFirstQuestionOnState(state) {
192
192
  }
193
193
  function setQuizOnState(state, quiz) {
194
194
  let questionMap = undefined;
195
- const currentAnswers = [...state.answers.values()];
195
+ const currentAnswers = Array.from(state.answers.values());
196
196
  if (quiz?.questions) {
197
197
  questionMap = new Map(quiz.questions.map((question) => [question.id, question]));
198
198
  }
@@ -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 * @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 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 = of(undefined);\n } else {\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 }\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;\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 const quiz = this.quiz();\n this.quizStore.setQuiz(quiz);\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 let result: Observable<QuizComponentViewConfig>;\n\n if (started) {\n result = 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 } else {\n result = 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 }\n\n return result;\n })\n );\n\n readonly viewConfigSignal: Signal<QuizComponentViewConfig> = toSignal(this.viewConfig$, { initialValue: { state: 'init' } });\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.clickNextQuestion();\n } else {\n this.quizStore.startQuiz();\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 (!Number.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 return submitted ? 'postsubmit' : 'presubmit';\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 }\n\n context.reject();\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 * @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 */\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 * @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 */\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,KAAK,KAAK,CAAC,IAAI,CAAC;AAC1C,IAAA,aAAa,GAAG,IAAI,CAAC,KAAK,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A,EAAA,IAAA,EACS,2BAA2B,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAG1B,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;;;;;;;;;;;;AAYG;AACG,SAAU,mBAAmB,CAAC,IAAY,EAAA;IAC9C,OAAO;AACL,QAAA,MAAM,EAAE,8DAA8D;QACtE,IAAI;AACJ,QAAA,QAAQ,EAAE;KACX;AACH;AAEA;;;;;;;;;;;;AAYG;AACG,SAAU,mBAAmB,CAAC,IAAY,EAAA;IAC9C,OAAO;AACL,QAAA,MAAM,EAAE,8DAA8D;QACtE,IAAI;AACJ,QAAA,QAAQ,EAAE;KACX;AACH;;AC1CA;;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 * @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 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 = of(undefined);\n } else {\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 }\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 = Array.from(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;\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 const quiz = this.quiz();\n this.quizStore.setQuiz(quiz);\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 let result: Observable<QuizComponentViewConfig>;\n\n if (started) {\n result = 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 } else {\n result = 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 }\n\n return result;\n })\n );\n\n readonly viewConfigSignal: Signal<QuizComponentViewConfig> = toSignal(this.viewConfig$, { initialValue: { state: 'init' } });\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.clickNextQuestion();\n } else {\n this.quizStore.startQuiz();\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 (!Number.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 return submitted ? 'postsubmit' : 'presubmit';\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 }\n\n context.reject();\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 * @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 */\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 * @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 */\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,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BAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAftB;;;;;;;;;;;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;;4FAG1B,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;;;;;;;;;;;;AAYG;AACG,SAAU,mBAAmB,CAAC,IAAY,EAAA;IAC9C,OAAO;AACL,QAAA,MAAM,EAAE,8DAA8D;QACtE,IAAI;AACJ,QAAA,QAAQ,EAAE;KACX;AACH;AAEA;;;;;;;;;;;;AAYG;AACG,SAAU,mBAAmB,CAAC,IAAY,EAAA;IAC9C,OAAO;AACL,QAAA,MAAM,EAAE,8DAA8D;QACtE,IAAI;AACJ,QAAA,QAAQ,EAAE;KACX;AACH;;AC1CA;;AAEG;;;;"}
@@ -123,7 +123,7 @@ class DbxFormStyleDemoPresetsComponent extends AbstractDbxFormStyleDemoControlsF
123
123
  ]
124
124
  };
125
125
  readControlsValue(controls) {
126
- return { presets: [...controls.activeTemplateKeysSignal()] };
126
+ return { presets: Array.from(controls.activeTemplateKeysSignal()) };
127
127
  }
128
128
  applyValueToControls(controls, value) {
129
129
  const formPresets = new Set(value.presets ?? []);
@@ -185,7 +185,7 @@ class DbxFormStyleDemoSectionsComponent extends AbstractDbxFormStyleDemoControls
185
185
  ]
186
186
  };
187
187
  readControlsValue(controls) {
188
- return { sections: [...controls.enabledIdsSignal()] };
188
+ return { sections: Array.from(controls.enabledIdsSignal()) };
189
189
  }
190
190
  applyValueToControls(controls, value) {
191
191
  const formSections = new Set(value.sections ?? []);
@@ -1 +1 @@
1
- {"version":3,"file":"dereekb-dbx-form-style-demo.mjs","sources":["../../../../packages/dbx-form/style-demo/src/lib/controls.form.directive.ts","../../../../packages/dbx-form/style-demo/src/lib/controls.presets.component.ts","../../../../packages/dbx-form/style-demo/src/lib/controls.sections.component.ts","../../../../packages/dbx-form/style-demo/src/lib/controls.sections.popover.component.ts","../../../../packages/dbx-form/style-demo/src/lib/controls.detach.component.ts","../../../../packages/dbx-form/style-demo/src/lib/fields.section.component.ts","../../../../packages/dbx-form/style-demo/src/lib/form.style.demo.providers.ts","../../../../packages/dbx-form/style-demo/src/dereekb-dbx-form-style-demo.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { filter, switchMap } from 'rxjs';\nimport { type Maybe } from '@dereekb/util';\nimport { filterMaybe } from '@dereekb/rxjs';\nimport { cleanSubscription } from '@dereekb/dbx-core';\nimport { AbstractSyncForgeFormDirective, dbxFormSourceObservableFromStream } from '@dereekb/dbx-form';\nimport { type DbxStyleDemoControls } from '@dereekb/dbx-web/style-demo';\n\n/**\n * Abstract base for the slim style-demo controls form components ({@link DbxFormStyleDemoPresetsComponent},\n * {@link DbxFormStyleDemoSectionsComponent}).\n *\n * Keeps a single `pickablechipfield` form in two-way sync with the playground's {@link DbxStyleDemoControls} (read from\n * the `controls` input). The controls UI lives in dbx-form because the pickable chip field is a `@dereekb/dbx-form`\n * field, which `@dereekb/dbx-web` cannot import.\n *\n * Both sync directions are driven off the form's state stream so they survive the component being recreated each time\n * the panel/popover reopens:\n *\n * - **Controls → form (seed):** {@link dbxFormSourceObservableFromStream} in `'reset'` mode re-pushes the controls\n * state into the form every time the form enters its RESET state. This covers the initial ready transition — which\n * only fires once the forge field delegate has registered — so the chips seed from the live service state even though the\n * delegate's `init` ignores the context's pending initial value. The `isSettingValue` guard filters the synchronous\n * reset feedback `setValue` produces, exactly as `DbxFormSourceDirective` documents.\n * - **Form → controls (write-back):** only genuine user edits are applied. `setValue` marks the form pristine and\n * untouched, so every seed / reset / initialization emission is `pristine: true`; the pickable chip field marks its\n * control dirty on toggle, so a user edit is the only `pristine: false` emission. Filtering on that keeps init/reset\n * noise from ever wiping the live service state.\n *\n * This directive is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n *\n * @typeParam V - The form value type (a subset of the controls state: enabled sections or active presets).\n */\n@Directive()\nexport abstract class AbstractDbxFormStyleDemoControlsFormDirective<V extends object> extends AbstractSyncForgeFormDirective<V> {\n /**\n * The playground control surface to keep the chip field in sync with.\n */\n readonly controls = input<Maybe<DbxStyleDemoControls>>(undefined);\n\n /**\n * Guards the controls→form seed against the `setValue` → `resetForm` feedback loop: set before `setValue` and cleared\n * on the next microtask, so the synchronous reset emission `setValue` triggers on the stream is filtered out.\n */\n private _isSettingValue = false;\n\n /**\n * Builds the form value from the controls service signals.\n */\n protected abstract readControlsValue(controls: DbxStyleDemoControls): V;\n\n /**\n * Diff-applies the form value to the controls service via its setters, writing only the deltas.\n */\n protected abstract applyValueToControls(controls: DbxStyleDemoControls, value: V): void;\n\n /**\n * The controls state as a form value, recomputed whenever the controls signals change.\n */\n private readonly _controlsValue$ = toObservable(\n computed<Maybe<V>>(() => {\n const controls = this.controls();\n return controls == null ? undefined : this.readControlsValue(controls);\n })\n ).pipe(filterMaybe());\n\n /**\n * Controls → form: seed the form with the controls state on every RESET (see class docs).\n */\n protected readonly _seedFormSub = cleanSubscription(\n dbxFormSourceObservableFromStream(this.context.stream$.pipe(filter(() => !this._isSettingValue)), this._controlsValue$, 'reset').subscribe((value) => {\n this._isSettingValue = true;\n this.context.setValue(value);\n void Promise.resolve().then(() => (this._isSettingValue = false));\n })\n );\n\n /**\n * Form → controls: write back only genuine user edits (`pristine: false`), diff-applied as deltas (see class docs).\n */\n protected readonly _writeBackSub = cleanSubscription(\n this.context.stream$\n .pipe(\n filter((event) => event.pristine === false),\n switchMap(() => this.context.getValue())\n )\n .subscribe((value) => {\n const controls = this.controls();\n\n if (controls != null && value != null) {\n this.applyValueToControls(controls, value);\n }\n })\n );\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport type { FieldDef, FormConfig } from '@ng-forge/dynamic-forms';\nimport { of } from 'rxjs';\nimport { DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders, dbxForgePickableChipField, type PickableValueFieldValue } from '@dereekb/dbx-form';\nimport { type DbxStyleDemoControls, type DbxStyleDemoStyleTemplateKey, type DbxStyleDemoTemplateToggle } from '@dereekb/dbx-web/style-demo';\nimport { AbstractDbxFormStyleDemoControlsFormDirective } from './controls.form.directive';\n\n/**\n * Form value for the {@link DbxFormStyleDemoPresetsComponent}: the keys of the active style-lever presets.\n */\nexport interface DbxFormStyleDemoPresetsFormValue {\n readonly presets: DbxStyleDemoStyleTemplateKey[];\n}\n\n/**\n * Slim chip-field controls UI picking which style-lever presets are active, kept in two-way sync with the playground's\n * {@link DbxStyleDemoControls}. Presets restyle the whole app, so this is what the global \"Style Controls\" detach panel\n * renders.\n *\n * Because the chip field is a `dbx-forge` field, the host app must register its forge field declarations (the demo\n * app does so via `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).\n *\n * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n */\n@Component({\n selector: 'dbx-form-style-demo-presets',\n template: `\n <dbx-forge></dbx-forge>\n `,\n standalone: true,\n imports: [DbxForgeFormComponentImportsModule],\n providers: dbxForgeFormComponentProviders(),\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxFormStyleDemoPresetsComponent extends AbstractDbxFormStyleDemoControlsFormDirective<DbxFormStyleDemoPresetsFormValue> {\n readonly formConfig: FormConfig = {\n fields: [\n dbxForgePickableChipField<DbxStyleDemoStyleTemplateKey, DbxStyleDemoTemplateToggle>({\n key: 'presets',\n label: 'Presets',\n props: {\n loadValues: () => of((this.controls()?.templateTogglesSignal() ?? []).map((toggle) => ({ value: toggle.templateName, meta: toggle }))),\n displayForValue: (values: PickableValueFieldValue<DbxStyleDemoStyleTemplateKey, DbxStyleDemoTemplateToggle>[]) => {\n const toggleMap = new Map((this.controls()?.templateTogglesSignal() ?? []).map((toggle) => [toggle.templateName, toggle]));\n return of(\n values.map((x) => {\n const toggle = x.meta ?? toggleMap.get(x.value);\n return { ...x, meta: toggle, label: toggle?.label ?? x.value, sublabel: toggle?.group ?? undefined };\n })\n );\n },\n filterSelectedValues: (input) => {\n const toggles = this.controls()?.templateTogglesSignal() ?? [];\n const groupForKey = new Map(toggles.map((toggle) => [toggle.templateName, toggle.group]));\n const beforeValuesSet = new Set(input.beforeValues);\n const addedKeys = input.afterValues.filter((key) => !beforeValuesSet.has(key));\n\n let result = input.afterValues;\n\n addedKeys.forEach((addedKey) => {\n const group = groupForKey.get(addedKey);\n\n if (group != null) {\n // Same-group presets are mutually exclusive: keep only the newly added key in its group.\n result = result.filter((key) => key === addedKey || groupForKey.get(key) !== group);\n }\n });\n\n return result;\n }\n }\n })\n ] as FieldDef<unknown>[]\n } as FormConfig;\n\n protected readControlsValue(controls: DbxStyleDemoControls): DbxFormStyleDemoPresetsFormValue {\n return { presets: [...controls.activeTemplateKeysSignal()] };\n }\n\n protected applyValueToControls(controls: DbxStyleDemoControls, value: DbxFormStyleDemoPresetsFormValue): void {\n const formPresets = new Set(value.presets ?? []);\n const activeKeys = controls.activeTemplateKeysSignal();\n\n controls.templateTogglesSignal().forEach((toggle) => {\n const shouldActivate = formPresets.has(toggle.templateName);\n\n if (shouldActivate !== activeKeys.has(toggle.templateName)) {\n controls.setTemplateActive(toggle.templateName, shouldActivate);\n }\n });\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport type { FieldDef, FormConfig } from '@ng-forge/dynamic-forms';\nimport { of } from 'rxjs';\nimport { DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders, dbxForgePickableChipField, type PickableValueFieldValue } from '@dereekb/dbx-form';\nimport { type DbxStyleDemoControls, type DbxStyleDemoSection, type DbxStyleDemoSectionId } from '@dereekb/dbx-web/style-demo';\nimport { AbstractDbxFormStyleDemoControlsFormDirective } from './controls.form.directive';\n\n/**\n * Form value for the {@link DbxFormStyleDemoSectionsComponent}: the ids of the enabled (visible) sections.\n */\nexport interface DbxFormStyleDemoSectionsFormValue {\n readonly sections: DbxStyleDemoSectionId[];\n}\n\n/**\n * Slim chip-field controls UI picking which showcase sections are visible, kept in two-way sync with the playground's\n * {@link DbxStyleDemoControls}. Sections only affect the `<dbx-style-demo>` playground page, so this renders inside a\n * popover opened from the playground header rather than the global controls panel.\n *\n * Because the chip field is a `dbx-forge` field, the host app must register its forge field declarations (the demo\n * app does so via `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).\n *\n * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n */\n@Component({\n selector: 'dbx-form-style-demo-sections',\n template: `\n <dbx-forge></dbx-forge>\n `,\n standalone: true,\n imports: [DbxForgeFormComponentImportsModule],\n providers: dbxForgeFormComponentProviders(),\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxFormStyleDemoSectionsComponent extends AbstractDbxFormStyleDemoControlsFormDirective<DbxFormStyleDemoSectionsFormValue> {\n readonly formConfig: FormConfig = {\n fields: [\n dbxForgePickableChipField<DbxStyleDemoSectionId, DbxStyleDemoSection>({\n key: 'sections',\n label: 'Sections',\n props: {\n showSelectAllButton: true,\n loadValues: () => of((this.controls()?.sectionsSignal() ?? []).map((section) => ({ value: section.id, meta: section }))),\n displayForValue: (values: PickableValueFieldValue<DbxStyleDemoSectionId, DbxStyleDemoSection>[]) => {\n const sectionMap = new Map((this.controls()?.sectionsSignal() ?? []).map((section) => [section.id, section]));\n return of(\n values.map((x) => {\n const section = x.meta ?? sectionMap.get(x.value);\n return { ...x, meta: section, label: section?.title ?? x.value, sublabel: section?.group ?? undefined };\n })\n );\n }\n }\n })\n ] as FieldDef<unknown>[]\n } as FormConfig;\n\n protected readControlsValue(controls: DbxStyleDemoControls): DbxFormStyleDemoSectionsFormValue {\n return { sections: [...controls.enabledIdsSignal()] };\n }\n\n protected applyValueToControls(controls: DbxStyleDemoControls, value: DbxFormStyleDemoSectionsFormValue): void {\n const formSections = new Set(value.sections ?? []);\n const enabledIds = controls.enabledIdsSignal();\n\n controls.sectionsSignal().forEach((section) => {\n const shouldEnable = formSections.has(section.id);\n\n if (shouldEnable !== enabledIds.has(section.id)) {\n controls.setSectionEnabled(section.id, shouldEnable);\n }\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { AbstractPopoverDirective, DbxPopoverCloseButtonComponent, DbxPopoverContentComponent, DbxPopoverHeaderComponent, DbxPopoverScrollContentDirective } from '@dereekb/dbx-web';\nimport { DbxStyleDemoControlsService } from '@dereekb/dbx-web/style-demo';\nimport { DbxFormStyleDemoSectionsComponent } from './controls.sections.component';\n\n/**\n * Popover that renders {@link DbxFormStyleDemoSectionsComponent} inside the shared popover chrome, registered as the\n * style-demo sections component via `DBX_STYLE_DEMO_SECTIONS_COMPONENT` (see `provideDbxFormStyleDemo()`).\n *\n * `DbxStyleDemoControlsService` opens this through `DbxPopoverService`, anchored to the playground header's \"Sections\"\n * button, because sections only affect the `<dbx-style-demo>` playground page (unlike presets, which restyle the whole\n * app). `dbx-popover-scroll-content` gives the long sections list correct scrolling. The component reads the same\n * {@link DbxStyleDemoControlsService} instance and forwards it to the sections component, which owns the chip field and\n * the controls↔form sync.\n *\n * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n */\n@Component({\n selector: 'dbx-form-style-demo-sections-popover',\n template: `\n <dbx-popover-content>\n <dbx-popover-header icon=\"tune\" header=\"Sections\">\n <dbx-popover-close-button></dbx-popover-close-button>\n </dbx-popover-header>\n <dbx-popover-scroll-content>\n <div class=\"dbx-p2\"><dbx-form-style-demo-sections [controls]=\"controlsService\" /></div>\n </dbx-popover-scroll-content>\n </dbx-popover-content>\n `,\n standalone: true,\n imports: [DbxPopoverContentComponent, DbxPopoverHeaderComponent, DbxPopoverCloseButtonComponent, DbxPopoverScrollContentDirective, DbxFormStyleDemoSectionsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxFormStyleDemoSectionsPopoverComponent extends AbstractPopoverDirective {\n readonly controlsService = inject(DbxStyleDemoControlsService);\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { DbxDetachContentComponent, DbxDetachControlsComponent } from '@dereekb/dbx-web';\nimport { DbxStyleDemoControlsService } from '@dereekb/dbx-web/style-demo';\nimport { DbxFormStyleDemoPresetsComponent } from './controls.presets.component';\n\n/**\n * Detach panel that renders {@link DbxFormStyleDemoPresetsComponent} inside the shared detach chrome, registered as the\n * style-demo controls component via `DBX_STYLE_DEMO_CONTROLS_COMPONENT` (see `provideDbxFormStyleDemo()`).\n *\n * `DbxStyleDemoControlsService` opens this through `DbxDetachService`, so the panel survives navigation and is available\n * app-wide. It renders the presets chips (which restyle the whole app); sections (which only affect the playground page)\n * live in their own popover opened from the playground header. The component reads the same\n * {@link DbxStyleDemoControlsService} instance and forwards it to the presets component, which owns the chip field and\n * the controls↔form sync. Scrolling within the fixed-height pane comes from `.dbx-detach-content-container`.\n *\n * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n */\n@Component({\n selector: 'dbx-form-style-demo-controls-detach',\n template: `\n <dbx-detach-content>\n <dbx-detach-controls controls header=\"Style Controls\"></dbx-detach-controls>\n <div class=\"dbx-p3\">\n <dbx-form-style-demo-presets [controls]=\"controlsService\" />\n </div>\n </dbx-detach-content>\n `,\n standalone: true,\n imports: [DbxDetachContentComponent, DbxDetachControlsComponent, DbxFormStyleDemoPresetsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxFormStyleDemoControlsDetachComponent {\n readonly controlsService = inject(DbxStyleDemoControlsService);\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport type { FieldDef, FormConfig } from '@ng-forge/dynamic-forms';\nimport { AbstractSyncForgeFormDirective, DbxForgeFormComponentImportsModule, dbxForgeCheckboxField, dbxForgeEmailField, dbxForgeFormComponentProviders, dbxForgeNameField, dbxForgeTextAreaField, dbxForgeToggleField, dbxForgeValueSelectionField } from '@dereekb/dbx-form';\nimport { DbxDocsUiExampleComponent, DbxDocsUiExampleContentComponent, DbxDocsUiExampleInfoComponent } from '@dereekb/dbx-web/docs';\n\n/**\n * Style-demo section rendering a representative `<dbx-forge>` form (name, email, select, textarea, checkbox, toggle)\n * so the form-field surfaces are visible in the playground. Fields paint from the `--mat-form-field-*` and surface\n * tokens, so they respond live to the Shape and Surface levers and flip with light/dark.\n *\n * Requires the host app to register its forge field declarations (the demo app does so via\n * `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).\n *\n * @dbxDocsUiExample\n * @dbxDocsUiExampleSlug style-demo-form-fields\n * @dbxDocsUiExampleCategory style-demo\n * @dbxDocsUiExampleSummary A representative dbx-forge form (name, email, select, textarea, checkbox, toggle).\n * @dbxDocsUiExampleRelated text, value-selection, checkbox\n */\n@Component({\n selector: 'dbx-form-style-demo-fields-section',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [DbxDocsUiExampleComponent, DbxDocsUiExampleInfoComponent, DbxDocsUiExampleContentComponent, DbxForgeFormComponentImportsModule],\n providers: dbxForgeFormComponentProviders(),\n template: `\n <dbx-docs-ui-example header=\"Form Fields\" hint=\"A representative dbx-forge form.\">\n <dbx-docs-ui-example-info>\n <p>\n A mix of forge fields — name, email,\n <code>valueSelectionField</code>\n , textarea, checkbox, and toggle. Each draws its container colour and corner radius from the\n <code>--mat-form-field-*</code>\n tokens layered over the surface ramp, so the fields respond live to the Shape and Surface levers and flip with light/dark. The host app must register its forge field declarations for this section to render.\n </p>\n </dbx-docs-ui-example-info>\n <dbx-docs-ui-example-content>\n <dbx-forge></dbx-forge>\n </dbx-docs-ui-example-content>\n </dbx-docs-ui-example>\n `\n})\nexport class DbxFormStyleDemoFieldsSectionComponent extends AbstractSyncForgeFormDirective<object> {\n readonly formConfig: FormConfig = {\n fields: [\n dbxForgeNameField({ key: 'name', label: 'Full Name', required: true }),\n dbxForgeEmailField({ key: 'email', label: 'Email', required: true }),\n dbxForgeValueSelectionField({\n key: 'role',\n label: 'Role',\n props: {\n options: [\n { label: 'Admin', value: 'admin' },\n { label: 'Editor', value: 'editor' },\n { label: 'Viewer', value: 'viewer' }\n ]\n }\n }),\n dbxForgeTextAreaField({ key: 'bio', label: 'Bio', rows: 3 }),\n dbxForgeCheckboxField({ key: 'subscribe', label: 'Subscribe to updates' }),\n dbxForgeToggleField({ key: 'notifications', label: 'Enable notifications' })\n ] as FieldDef<unknown>[]\n } as FormConfig;\n}\n","import { type EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { DBX_STYLE_DEMO_CONTROLS_COMPONENT, DBX_STYLE_DEMO_SECTIONS_COMPONENT, type DbxStyleDemoSectionGroup, provideDbxStyleDemoSections } from '@dereekb/dbx-web/style-demo';\nimport { DbxFormStyleDemoControlsDetachComponent } from './controls.detach.component';\nimport { DbxFormStyleDemoSectionsPopoverComponent } from './controls.sections.popover.component';\nimport { DbxFormStyleDemoFieldsSectionComponent } from './fields.section.component';\n\n/**\n * The `@dereekb/dbx-form/style-demo` section group.\n */\nexport const DBX_FORM_STYLE_DEMO_SECTION_GROUP: DbxStyleDemoSectionGroup = {\n libId: 'dbx-form',\n sections: [{ id: 'dbx-form-fields', title: 'Form Fields', group: 'form', tags: ['dbx-form', 'form'], component: DbxFormStyleDemoFieldsSectionComponent, defaultEnabled: true }]\n};\n\n/**\n * Registers the `@dereekb/dbx-form/style-demo` sections with the `<dbx-style-demo>` playground, registers\n * {@link DbxFormStyleDemoControlsDetachComponent} as the global style-demo controls (presets) detach panel, and registers\n * {@link DbxFormStyleDemoSectionsPopoverComponent} as the style-demo sections popover opened from the playground header.\n *\n * The Form Fields section, the controls panel, and the sections popover all render `<dbx-forge>` forms, so the host app\n * must register its forge field declarations (e.g. `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`) for them to render.\n *\n * Pair with `provideDbxStyleDemo()` (the shell from `@dereekb/dbx-web/style-demo`).\n *\n * @returns EnvironmentProviders contributing the form sections, the controls detach component, and the sections popover component.\n *\n * @__NO_SIDE_EFFECTS__\n */\nexport function provideDbxFormStyleDemo(): EnvironmentProviders {\n return makeEnvironmentProviders([provideDbxStyleDemoSections(DBX_FORM_STYLE_DEMO_SECTION_GROUP), { provide: DBX_STYLE_DEMO_CONTROLS_COMPONENT, useValue: DbxFormStyleDemoControlsDetachComponent }, { provide: DBX_STYLE_DEMO_SECTIONS_COMPONENT, useValue: DbxFormStyleDemoSectionsPopoverComponent }]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AAEG,MAAgB,6CAAgE,SAAQ,8BAAiC,CAAA;AAC7H;;AAEG;AACM,IAAA,QAAQ,GAAG,KAAK,CAA8B,SAAS,+EAAC;AAEjE;;;AAGG;IACK,eAAe,GAAG,KAAK;AAY/B;;AAEG;AACc,IAAA,eAAe,GAAG,YAAY,CAC7C,QAAQ,CAAW,MAAK;AACtB,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE;AAChC,QAAA,OAAO,QAAQ,IAAI,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC;IACxE,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,IAAA,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,sCAAsC,EAAE,cAAc,EAAE,IAAI,EAAE;;AAGhL;;;;;;;;;;;;;AAaG;SACa,uBAAuB,GAAA;AACrC,IAAA,OAAO,wBAAwB,CAAC,CAAC,2BAA2B,CAAC,iCAAiC,CAAC,EAAE,EAAE,OAAO,EAAE,iCAAiC,EAAE,QAAQ,EAAE,uCAAuC,EAAE,EAAE,EAAE,OAAO,EAAE,iCAAiC,EAAE,QAAQ,EAAE,wCAAwC,EAAE,CAAC,CAAC;AAC1S;;AC9BA;;AAEG;;;;"}
1
+ {"version":3,"file":"dereekb-dbx-form-style-demo.mjs","sources":["../../../../packages/dbx-form/style-demo/src/lib/controls.form.directive.ts","../../../../packages/dbx-form/style-demo/src/lib/controls.presets.component.ts","../../../../packages/dbx-form/style-demo/src/lib/controls.sections.component.ts","../../../../packages/dbx-form/style-demo/src/lib/controls.sections.popover.component.ts","../../../../packages/dbx-form/style-demo/src/lib/controls.detach.component.ts","../../../../packages/dbx-form/style-demo/src/lib/fields.section.component.ts","../../../../packages/dbx-form/style-demo/src/lib/form.style.demo.providers.ts","../../../../packages/dbx-form/style-demo/src/dereekb-dbx-form-style-demo.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { filter, switchMap } from 'rxjs';\nimport { type Maybe } from '@dereekb/util';\nimport { filterMaybe } from '@dereekb/rxjs';\nimport { cleanSubscription } from '@dereekb/dbx-core';\nimport { AbstractSyncForgeFormDirective, dbxFormSourceObservableFromStream } from '@dereekb/dbx-form';\nimport { type DbxStyleDemoControls } from '@dereekb/dbx-web/style-demo';\n\n/**\n * Abstract base for the slim style-demo controls form components ({@link DbxFormStyleDemoPresetsComponent},\n * {@link DbxFormStyleDemoSectionsComponent}).\n *\n * Keeps a single `pickablechipfield` form in two-way sync with the playground's {@link DbxStyleDemoControls} (read from\n * the `controls` input). The controls UI lives in dbx-form because the pickable chip field is a `@dereekb/dbx-form`\n * field, which `@dereekb/dbx-web` cannot import.\n *\n * Both sync directions are driven off the form's state stream so they survive the component being recreated each time\n * the panel/popover reopens:\n *\n * - **Controls → form (seed):** {@link dbxFormSourceObservableFromStream} in `'reset'` mode re-pushes the controls\n * state into the form every time the form enters its RESET state. This covers the initial ready transition — which\n * only fires once the forge field delegate has registered — so the chips seed from the live service state even though the\n * delegate's `init` ignores the context's pending initial value. The `isSettingValue` guard filters the synchronous\n * reset feedback `setValue` produces, exactly as `DbxFormSourceDirective` documents.\n * - **Form → controls (write-back):** only genuine user edits are applied. `setValue` marks the form pristine and\n * untouched, so every seed / reset / initialization emission is `pristine: true`; the pickable chip field marks its\n * control dirty on toggle, so a user edit is the only `pristine: false` emission. Filtering on that keeps init/reset\n * noise from ever wiping the live service state.\n *\n * This directive is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n *\n * @typeParam V - The form value type (a subset of the controls state: enabled sections or active presets).\n */\n@Directive()\nexport abstract class AbstractDbxFormStyleDemoControlsFormDirective<V extends object> extends AbstractSyncForgeFormDirective<V> {\n /**\n * The playground control surface to keep the chip field in sync with.\n */\n readonly controls = input<Maybe<DbxStyleDemoControls>>(undefined);\n\n /**\n * Guards the controls→form seed against the `setValue` → `resetForm` feedback loop: set before `setValue` and cleared\n * on the next microtask, so the synchronous reset emission `setValue` triggers on the stream is filtered out.\n */\n private _isSettingValue = false;\n\n /**\n * Builds the form value from the controls service signals.\n */\n protected abstract readControlsValue(controls: DbxStyleDemoControls): V;\n\n /**\n * Diff-applies the form value to the controls service via its setters, writing only the deltas.\n */\n protected abstract applyValueToControls(controls: DbxStyleDemoControls, value: V): void;\n\n /**\n * The controls state as a form value, recomputed whenever the controls signals change.\n */\n private readonly _controlsValue$ = toObservable(\n computed<Maybe<V>>(() => {\n const controls = this.controls();\n return controls == null ? undefined : this.readControlsValue(controls);\n })\n ).pipe(filterMaybe());\n\n /**\n * Controls → form: seed the form with the controls state on every RESET (see class docs).\n */\n protected readonly _seedFormSub = cleanSubscription(\n dbxFormSourceObservableFromStream(this.context.stream$.pipe(filter(() => !this._isSettingValue)), this._controlsValue$, 'reset').subscribe((value) => {\n this._isSettingValue = true;\n this.context.setValue(value);\n void Promise.resolve().then(() => (this._isSettingValue = false));\n })\n );\n\n /**\n * Form → controls: write back only genuine user edits (`pristine: false`), diff-applied as deltas (see class docs).\n */\n protected readonly _writeBackSub = cleanSubscription(\n this.context.stream$\n .pipe(\n filter((event) => event.pristine === false),\n switchMap(() => this.context.getValue())\n )\n .subscribe((value) => {\n const controls = this.controls();\n\n if (controls != null && value != null) {\n this.applyValueToControls(controls, value);\n }\n })\n );\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport type { FieldDef, FormConfig } from '@ng-forge/dynamic-forms';\nimport { of } from 'rxjs';\nimport { DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders, dbxForgePickableChipField, type PickableValueFieldValue } from '@dereekb/dbx-form';\nimport { type DbxStyleDemoControls, type DbxStyleDemoStyleTemplateKey, type DbxStyleDemoTemplateToggle } from '@dereekb/dbx-web/style-demo';\nimport { AbstractDbxFormStyleDemoControlsFormDirective } from './controls.form.directive';\n\n/**\n * Form value for the {@link DbxFormStyleDemoPresetsComponent}: the keys of the active style-lever presets.\n */\nexport interface DbxFormStyleDemoPresetsFormValue {\n readonly presets: DbxStyleDemoStyleTemplateKey[];\n}\n\n/**\n * Slim chip-field controls UI picking which style-lever presets are active, kept in two-way sync with the playground's\n * {@link DbxStyleDemoControls}. Presets restyle the whole app, so this is what the global \"Style Controls\" detach panel\n * renders.\n *\n * Because the chip field is a `dbx-forge` field, the host app must register its forge field declarations (the demo\n * app does so via `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).\n *\n * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n */\n@Component({\n selector: 'dbx-form-style-demo-presets',\n template: `\n <dbx-forge></dbx-forge>\n `,\n standalone: true,\n imports: [DbxForgeFormComponentImportsModule],\n providers: dbxForgeFormComponentProviders(),\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxFormStyleDemoPresetsComponent extends AbstractDbxFormStyleDemoControlsFormDirective<DbxFormStyleDemoPresetsFormValue> {\n readonly formConfig: FormConfig = {\n fields: [\n dbxForgePickableChipField<DbxStyleDemoStyleTemplateKey, DbxStyleDemoTemplateToggle>({\n key: 'presets',\n label: 'Presets',\n props: {\n loadValues: () => of((this.controls()?.templateTogglesSignal() ?? []).map((toggle) => ({ value: toggle.templateName, meta: toggle }))),\n displayForValue: (values: PickableValueFieldValue<DbxStyleDemoStyleTemplateKey, DbxStyleDemoTemplateToggle>[]) => {\n const toggleMap = new Map((this.controls()?.templateTogglesSignal() ?? []).map((toggle) => [toggle.templateName, toggle]));\n return of(\n values.map((x) => {\n const toggle = x.meta ?? toggleMap.get(x.value);\n return { ...x, meta: toggle, label: toggle?.label ?? x.value, sublabel: toggle?.group ?? undefined };\n })\n );\n },\n filterSelectedValues: (input) => {\n const toggles = this.controls()?.templateTogglesSignal() ?? [];\n const groupForKey = new Map(toggles.map((toggle) => [toggle.templateName, toggle.group]));\n const beforeValuesSet = new Set(input.beforeValues);\n const addedKeys = input.afterValues.filter((key) => !beforeValuesSet.has(key));\n\n let result = input.afterValues;\n\n addedKeys.forEach((addedKey) => {\n const group = groupForKey.get(addedKey);\n\n if (group != null) {\n // Same-group presets are mutually exclusive: keep only the newly added key in its group.\n result = result.filter((key) => key === addedKey || groupForKey.get(key) !== group);\n }\n });\n\n return result;\n }\n }\n })\n ] as FieldDef<unknown>[]\n } as FormConfig;\n\n protected readControlsValue(controls: DbxStyleDemoControls): DbxFormStyleDemoPresetsFormValue {\n return { presets: Array.from(controls.activeTemplateKeysSignal()) };\n }\n\n protected applyValueToControls(controls: DbxStyleDemoControls, value: DbxFormStyleDemoPresetsFormValue): void {\n const formPresets = new Set(value.presets ?? []);\n const activeKeys = controls.activeTemplateKeysSignal();\n\n controls.templateTogglesSignal().forEach((toggle) => {\n const shouldActivate = formPresets.has(toggle.templateName);\n\n if (shouldActivate !== activeKeys.has(toggle.templateName)) {\n controls.setTemplateActive(toggle.templateName, shouldActivate);\n }\n });\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport type { FieldDef, FormConfig } from '@ng-forge/dynamic-forms';\nimport { of } from 'rxjs';\nimport { DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders, dbxForgePickableChipField, type PickableValueFieldValue } from '@dereekb/dbx-form';\nimport { type DbxStyleDemoControls, type DbxStyleDemoSection, type DbxStyleDemoSectionId } from '@dereekb/dbx-web/style-demo';\nimport { AbstractDbxFormStyleDemoControlsFormDirective } from './controls.form.directive';\n\n/**\n * Form value for the {@link DbxFormStyleDemoSectionsComponent}: the ids of the enabled (visible) sections.\n */\nexport interface DbxFormStyleDemoSectionsFormValue {\n readonly sections: DbxStyleDemoSectionId[];\n}\n\n/**\n * Slim chip-field controls UI picking which showcase sections are visible, kept in two-way sync with the playground's\n * {@link DbxStyleDemoControls}. Sections only affect the `<dbx-style-demo>` playground page, so this renders inside a\n * popover opened from the playground header rather than the global controls panel.\n *\n * Because the chip field is a `dbx-forge` field, the host app must register its forge field declarations (the demo\n * app does so via `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).\n *\n * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n */\n@Component({\n selector: 'dbx-form-style-demo-sections',\n template: `\n <dbx-forge></dbx-forge>\n `,\n standalone: true,\n imports: [DbxForgeFormComponentImportsModule],\n providers: dbxForgeFormComponentProviders(),\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxFormStyleDemoSectionsComponent extends AbstractDbxFormStyleDemoControlsFormDirective<DbxFormStyleDemoSectionsFormValue> {\n readonly formConfig: FormConfig = {\n fields: [\n dbxForgePickableChipField<DbxStyleDemoSectionId, DbxStyleDemoSection>({\n key: 'sections',\n label: 'Sections',\n props: {\n showSelectAllButton: true,\n loadValues: () => of((this.controls()?.sectionsSignal() ?? []).map((section) => ({ value: section.id, meta: section }))),\n displayForValue: (values: PickableValueFieldValue<DbxStyleDemoSectionId, DbxStyleDemoSection>[]) => {\n const sectionMap = new Map((this.controls()?.sectionsSignal() ?? []).map((section) => [section.id, section]));\n return of(\n values.map((x) => {\n const section = x.meta ?? sectionMap.get(x.value);\n return { ...x, meta: section, label: section?.title ?? x.value, sublabel: section?.group ?? undefined };\n })\n );\n }\n }\n })\n ] as FieldDef<unknown>[]\n } as FormConfig;\n\n protected readControlsValue(controls: DbxStyleDemoControls): DbxFormStyleDemoSectionsFormValue {\n return { sections: Array.from(controls.enabledIdsSignal()) };\n }\n\n protected applyValueToControls(controls: DbxStyleDemoControls, value: DbxFormStyleDemoSectionsFormValue): void {\n const formSections = new Set(value.sections ?? []);\n const enabledIds = controls.enabledIdsSignal();\n\n controls.sectionsSignal().forEach((section) => {\n const shouldEnable = formSections.has(section.id);\n\n if (shouldEnable !== enabledIds.has(section.id)) {\n controls.setSectionEnabled(section.id, shouldEnable);\n }\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { AbstractPopoverDirective, DbxPopoverCloseButtonComponent, DbxPopoverContentComponent, DbxPopoverHeaderComponent, DbxPopoverScrollContentDirective } from '@dereekb/dbx-web';\nimport { DbxStyleDemoControlsService } from '@dereekb/dbx-web/style-demo';\nimport { DbxFormStyleDemoSectionsComponent } from './controls.sections.component';\n\n/**\n * Popover that renders {@link DbxFormStyleDemoSectionsComponent} inside the shared popover chrome, registered as the\n * style-demo sections component via `DBX_STYLE_DEMO_SECTIONS_COMPONENT` (see `provideDbxFormStyleDemo()`).\n *\n * `DbxStyleDemoControlsService` opens this through `DbxPopoverService`, anchored to the playground header's \"Sections\"\n * button, because sections only affect the `<dbx-style-demo>` playground page (unlike presets, which restyle the whole\n * app). `dbx-popover-scroll-content` gives the long sections list correct scrolling. The component reads the same\n * {@link DbxStyleDemoControlsService} instance and forwards it to the sections component, which owns the chip field and\n * the controls↔form sync.\n *\n * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n */\n@Component({\n selector: 'dbx-form-style-demo-sections-popover',\n template: `\n <dbx-popover-content>\n <dbx-popover-header icon=\"tune\" header=\"Sections\">\n <dbx-popover-close-button></dbx-popover-close-button>\n </dbx-popover-header>\n <dbx-popover-scroll-content>\n <div class=\"dbx-p2\"><dbx-form-style-demo-sections [controls]=\"controlsService\" /></div>\n </dbx-popover-scroll-content>\n </dbx-popover-content>\n `,\n standalone: true,\n imports: [DbxPopoverContentComponent, DbxPopoverHeaderComponent, DbxPopoverCloseButtonComponent, DbxPopoverScrollContentDirective, DbxFormStyleDemoSectionsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxFormStyleDemoSectionsPopoverComponent extends AbstractPopoverDirective {\n readonly controlsService = inject(DbxStyleDemoControlsService);\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { DbxDetachContentComponent, DbxDetachControlsComponent } from '@dereekb/dbx-web';\nimport { DbxStyleDemoControlsService } from '@dereekb/dbx-web/style-demo';\nimport { DbxFormStyleDemoPresetsComponent } from './controls.presets.component';\n\n/**\n * Detach panel that renders {@link DbxFormStyleDemoPresetsComponent} inside the shared detach chrome, registered as the\n * style-demo controls component via `DBX_STYLE_DEMO_CONTROLS_COMPONENT` (see `provideDbxFormStyleDemo()`).\n *\n * `DbxStyleDemoControlsService` opens this through `DbxDetachService`, so the panel survives navigation and is available\n * app-wide. It renders the presets chips (which restyle the whole app); sections (which only affect the playground page)\n * live in their own popover opened from the playground header. The component reads the same\n * {@link DbxStyleDemoControlsService} instance and forwards it to the presets component, which owns the chip field and\n * the controls↔form sync. Scrolling within the fixed-height pane comes from `.dbx-detach-content-container`.\n *\n * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n */\n@Component({\n selector: 'dbx-form-style-demo-controls-detach',\n template: `\n <dbx-detach-content>\n <dbx-detach-controls controls header=\"Style Controls\"></dbx-detach-controls>\n <div class=\"dbx-p3\">\n <dbx-form-style-demo-presets [controls]=\"controlsService\" />\n </div>\n </dbx-detach-content>\n `,\n standalone: true,\n imports: [DbxDetachContentComponent, DbxDetachControlsComponent, DbxFormStyleDemoPresetsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxFormStyleDemoControlsDetachComponent {\n readonly controlsService = inject(DbxStyleDemoControlsService);\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport type { FieldDef, FormConfig } from '@ng-forge/dynamic-forms';\nimport { AbstractSyncForgeFormDirective, DbxForgeFormComponentImportsModule, dbxForgeCheckboxField, dbxForgeEmailField, dbxForgeFormComponentProviders, dbxForgeNameField, dbxForgeTextAreaField, dbxForgeToggleField, dbxForgeValueSelectionField } from '@dereekb/dbx-form';\nimport { DbxDocsUiExampleComponent, DbxDocsUiExampleContentComponent, DbxDocsUiExampleInfoComponent } from '@dereekb/dbx-web/docs';\n\n/**\n * Style-demo section rendering a representative `<dbx-forge>` form (name, email, select, textarea, checkbox, toggle)\n * so the form-field surfaces are visible in the playground. Fields paint from the `--mat-form-field-*` and surface\n * tokens, so they respond live to the Shape and Surface levers and flip with light/dark.\n *\n * Requires the host app to register its forge field declarations (the demo app does so via\n * `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).\n *\n * @dbxDocsUiExample\n * @dbxDocsUiExampleSlug style-demo-form-fields\n * @dbxDocsUiExampleCategory style-demo\n * @dbxDocsUiExampleSummary A representative dbx-forge form (name, email, select, textarea, checkbox, toggle).\n * @dbxDocsUiExampleRelated text, value-selection, checkbox\n */\n@Component({\n selector: 'dbx-form-style-demo-fields-section',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [DbxDocsUiExampleComponent, DbxDocsUiExampleInfoComponent, DbxDocsUiExampleContentComponent, DbxForgeFormComponentImportsModule],\n providers: dbxForgeFormComponentProviders(),\n template: `\n <dbx-docs-ui-example header=\"Form Fields\" hint=\"A representative dbx-forge form.\">\n <dbx-docs-ui-example-info>\n <p>\n A mix of forge fields — name, email,\n <code>valueSelectionField</code>\n , textarea, checkbox, and toggle. Each draws its container colour and corner radius from the\n <code>--mat-form-field-*</code>\n tokens layered over the surface ramp, so the fields respond live to the Shape and Surface levers and flip with light/dark. The host app must register its forge field declarations for this section to render.\n </p>\n </dbx-docs-ui-example-info>\n <dbx-docs-ui-example-content>\n <dbx-forge></dbx-forge>\n </dbx-docs-ui-example-content>\n </dbx-docs-ui-example>\n `\n})\nexport class DbxFormStyleDemoFieldsSectionComponent extends AbstractSyncForgeFormDirective<object> {\n readonly formConfig: FormConfig = {\n fields: [\n dbxForgeNameField({ key: 'name', label: 'Full Name', required: true }),\n dbxForgeEmailField({ key: 'email', label: 'Email', required: true }),\n dbxForgeValueSelectionField({\n key: 'role',\n label: 'Role',\n props: {\n options: [\n { label: 'Admin', value: 'admin' },\n { label: 'Editor', value: 'editor' },\n { label: 'Viewer', value: 'viewer' }\n ]\n }\n }),\n dbxForgeTextAreaField({ key: 'bio', label: 'Bio', rows: 3 }),\n dbxForgeCheckboxField({ key: 'subscribe', label: 'Subscribe to updates' }),\n dbxForgeToggleField({ key: 'notifications', label: 'Enable notifications' })\n ] as FieldDef<unknown>[]\n } as FormConfig;\n}\n","import { type EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { DBX_STYLE_DEMO_CONTROLS_COMPONENT, DBX_STYLE_DEMO_SECTIONS_COMPONENT, type DbxStyleDemoSectionGroup, provideDbxStyleDemoSections } from '@dereekb/dbx-web/style-demo';\nimport { DbxFormStyleDemoControlsDetachComponent } from './controls.detach.component';\nimport { DbxFormStyleDemoSectionsPopoverComponent } from './controls.sections.popover.component';\nimport { DbxFormStyleDemoFieldsSectionComponent } from './fields.section.component';\n\n/**\n * The `@dereekb/dbx-form/style-demo` section group.\n */\nexport const DBX_FORM_STYLE_DEMO_SECTION_GROUP: DbxStyleDemoSectionGroup = {\n libId: 'dbx-form',\n sections: [{ id: 'dbx-form-fields', title: 'Form Fields', group: 'form', tags: ['dbx-form', 'form'], component: DbxFormStyleDemoFieldsSectionComponent, defaultEnabled: true }]\n};\n\n/**\n * Registers the `@dereekb/dbx-form/style-demo` sections with the `<dbx-style-demo>` playground, registers\n * {@link DbxFormStyleDemoControlsDetachComponent} as the global style-demo controls (presets) detach panel, and registers\n * {@link DbxFormStyleDemoSectionsPopoverComponent} as the style-demo sections popover opened from the playground header.\n *\n * The Form Fields section, the controls panel, and the sections popover all render `<dbx-forge>` forms, so the host app\n * must register its forge field declarations (e.g. `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`) for them to render.\n *\n * Pair with `provideDbxStyleDemo()` (the shell from `@dereekb/dbx-web/style-demo`).\n *\n * @returns EnvironmentProviders contributing the form sections, the controls detach component, and the sections popover component.\n *\n * @__NO_SIDE_EFFECTS__\n */\nexport function provideDbxFormStyleDemo(): EnvironmentProviders {\n return makeEnvironmentProviders([provideDbxStyleDemoSections(DBX_FORM_STYLE_DEMO_SECTION_GROUP), { provide: DBX_STYLE_DEMO_CONTROLS_COMPONENT, useValue: DbxFormStyleDemoControlsDetachComponent }, { provide: DBX_STYLE_DEMO_SECTIONS_COMPONENT, useValue: DbxFormStyleDemoSectionsPopoverComponent }]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AAEG,MAAgB,6CAAgE,SAAQ,8BAAiC,CAAA;AAC7H;;AAEG;AACM,IAAA,QAAQ,GAAG,KAAK,CAA8B,SAAS,+EAAC;AAEjE;;;AAGG;IACK,eAAe,GAAG,KAAK;AAY/B;;AAEG;AACc,IAAA,eAAe,GAAG,YAAY,CAC7C,QAAQ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CAAgC,EAAE,kCAAkC,CAAC;oBACzI,SAAS,EAAE,8BAA8B,EAAE;AAC3C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;AAeT,EAAA;AACF,iBAAA;;;ACnCD;;AAEG;AACI,MAAM,iCAAiC,GAA6B;AACzE,IAAA,KAAK,EAAE,UAAU;AACjB,IAAA,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,sCAAsC,EAAE,cAAc,EAAE,IAAI,EAAE;;AAGhL;;;;;;;;;;;;;AAaG;SACa,uBAAuB,GAAA;AACrC,IAAA,OAAO,wBAAwB,CAAC,CAAC,2BAA2B,CAAC,iCAAiC,CAAC,EAAE,EAAE,OAAO,EAAE,iCAAiC,EAAE,QAAQ,EAAE,uCAAuC,EAAE,EAAE,EAAE,OAAO,EAAE,iCAAiC,EAAE,QAAQ,EAAE,wCAAwC,EAAE,CAAC,CAAC;AAC1S;;AC9BA;;AAEG;;;;"}
@@ -8266,7 +8266,7 @@ class DbxForgeSourceSelectFieldComponent {
8266
8266
  result = addToSetCopy(acc, values);
8267
8267
  }
8268
8268
  return result;
8269
- }, new Set()), distinctUntilChanged(), map((x) => [...x]), shareReplay(1));
8269
+ }, new Set()), distinctUntilChanged(), map((x) => Array.from(x)), shareReplay(1));
8270
8270
  sourceSelectValuesFromValuesState$ = this.allValuesEverSelected$.pipe(distinctUntilChanged(), switchMap((values) => this._loadSourceSelectValueForValues(values)), shareReplay(1));
8271
8271
  loadSources$ = this._loadSources.pipe(filterMaybe(), switchMap((loadSource) => {
8272
8272
  const p = this.props();