ng-primitives 0.79.0 → 0.80.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.
- package/ai/README.md +3 -0
- package/ai/index.d.ts +16 -0
- package/ai/prompt-composer/prompt-composer-state.d.ts +17 -0
- package/ai/prompt-composer/prompt-composer.d.ts +23 -0
- package/ai/prompt-composer-dictation/prompt-composer-dictation-state.d.ts +17 -0
- package/ai/prompt-composer-dictation/prompt-composer-dictation.d.ts +29 -0
- package/ai/prompt-composer-input/prompt-composer-input-state.d.ts +17 -0
- package/ai/prompt-composer-input/prompt-composer-input.d.ts +16 -0
- package/ai/prompt-composer-submit/prompt-composer-submit-state.d.ts +17 -0
- package/ai/prompt-composer-submit/prompt-composer-submit.d.ts +15 -0
- package/ai/thread/thread-state.d.ts +17 -0
- package/ai/thread/thread.d.ts +23 -0
- package/ai/thread-message/thread-message-state.d.ts +17 -0
- package/ai/thread-message/thread-message.d.ts +11 -0
- package/ai/thread-suggestion/thread-suggestion-state.d.ts +17 -0
- package/ai/thread-suggestion/thread-suggestion.d.ts +14 -0
- package/ai/thread-viewport/thread-viewport-state.d.ts +17 -0
- package/ai/thread-viewport/thread-viewport.d.ts +34 -0
- package/combobox/utils.d.ts +9 -0
- package/fesm2022/ng-primitives-ai.mjs +593 -0
- package/fesm2022/ng-primitives-ai.mjs.map +1 -0
- package/fesm2022/ng-primitives-combobox.mjs +72 -4
- package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
- package/package.json +27 -23
- package/toast/toast/toast.d.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-primitives-ai.mjs","sources":["../../../../packages/ng-primitives/ai/src/prompt-composer/prompt-composer-state.ts","../../../../packages/ng-primitives/ai/src/thread/thread-state.ts","../../../../packages/ng-primitives/ai/src/prompt-composer-input/prompt-composer-input-state.ts","../../../../packages/ng-primitives/ai/src/prompt-composer-input/prompt-composer-input.ts","../../../../packages/ng-primitives/ai/src/prompt-composer-submit/prompt-composer-submit-state.ts","../../../../packages/ng-primitives/ai/src/prompt-composer-submit/prompt-composer-submit.ts","../../../../packages/ng-primitives/ai/src/prompt-composer/prompt-composer.ts","../../../../packages/ng-primitives/ai/src/thread-message/thread-message-state.ts","../../../../packages/ng-primitives/ai/src/thread-message/thread-message.ts","../../../../packages/ng-primitives/ai/src/thread/thread.ts","../../../../packages/ng-primitives/ai/src/prompt-composer-dictation/prompt-composer-dictation-state.ts","../../../../packages/ng-primitives/ai/src/prompt-composer-dictation/prompt-composer-dictation.ts","../../../../packages/ng-primitives/ai/src/thread-viewport/thread-viewport-state.ts","../../../../packages/ng-primitives/ai/src/thread-viewport/thread-viewport.ts","../../../../packages/ng-primitives/ai/src/thread-suggestion/thread-suggestion-state.ts","../../../../packages/ng-primitives/ai/src/thread-suggestion/thread-suggestion.ts","../../../../packages/ng-primitives/ai/src/ng-primitives-ai.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpPromptComposer } from './prompt-composer';\n\n/**\n * The state token for the PromptComposer primitive.\n */\nexport const NgpPromptComposerStateToken = createStateToken<NgpPromptComposer>('PromptComposer');\n\n/**\n * Provides the PromptComposer state.\n */\nexport const providePromptComposerState = createStateProvider(NgpPromptComposerStateToken);\n\n/**\n * Injects the PromptComposer state.\n */\nexport const injectPromptComposerState = createStateInjector<NgpPromptComposer>(\n NgpPromptComposerStateToken,\n);\n\n/**\n * The PromptComposer state registration function.\n */\nexport const promptComposerState = createState(NgpPromptComposerStateToken);\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpThread } from './thread';\n\n/**\n * The state token for the Thread primitive.\n */\nexport const NgpThreadStateToken = createStateToken<NgpThread>('Thread');\n\n/**\n * Provides the Thread state.\n */\nexport const provideThreadState = createStateProvider(NgpThreadStateToken);\n\n/**\n * Injects the Thread state.\n */\nexport const injectThreadState = createStateInjector<NgpThread>(NgpThreadStateToken);\n\n/**\n * The Thread state registration function.\n */\nexport const threadState = createState(NgpThreadStateToken);\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpPromptComposerInput } from './prompt-composer-input';\n\n/**\n * The state token for the PromptComposerInput primitive.\n */\nexport const NgpPromptComposerInputStateToken =\n createStateToken<NgpPromptComposerInput>('PromptComposerInput');\n\n/**\n * Provides the PromptComposerInput state.\n */\nexport const providePromptComposerInputState = createStateProvider(\n NgpPromptComposerInputStateToken,\n);\n\n/**\n * Injects the PromptComposerInput state.\n */\nexport const injectPromptComposerInputState = createStateInjector<NgpPromptComposerInput>(\n NgpPromptComposerInputStateToken,\n);\n\n/**\n * The PromptComposerInput state registration function.\n */\nexport const promptComposerInputState = createState(NgpPromptComposerInputStateToken);\n","import { Directive, HostListener } from '@angular/core';\nimport { explicitEffect, injectElementRef } from 'ng-primitives/internal';\nimport { safeTakeUntilDestroyed } from 'ng-primitives/utils';\nimport { fromEvent } from 'rxjs';\nimport { injectPromptComposerState } from '../prompt-composer/prompt-composer-state';\nimport { injectThreadState } from '../thread/thread-state';\nimport {\n promptComposerInputState,\n providePromptComposerInputState,\n} from './prompt-composer-input-state';\n\n@Directive({\n selector: 'input[ngpPromptComposerInput], textarea[ngpPromptComposerInput]',\n exportAs: 'ngpPromptComposerInput',\n providers: [providePromptComposerInputState()],\n})\nexport class NgpPromptComposerInput {\n protected readonly thread = injectThreadState();\n private readonly composer = injectPromptComposerState();\n private readonly element = injectElementRef<HTMLInputElement | HTMLTextAreaElement>();\n\n /** The state of the prompt composer input. */\n protected readonly state = promptComposerInputState<NgpPromptComposerInput>(this);\n\n constructor() {\n // set the initial state\n this.composer().prompt.set(this.element.nativeElement.value);\n\n // listen for requests to set the prompt\n this.thread()\n .requestPrompt.pipe(safeTakeUntilDestroyed())\n .subscribe(value => {\n // set the cursor to the end\n this.composer().prompt.set(value);\n this.element.nativeElement.setSelectionRange(value.length, value.length);\n this.element.nativeElement.focus();\n });\n\n // listen for changes to the text content\n fromEvent(this.element.nativeElement, 'input')\n .pipe(safeTakeUntilDestroyed())\n .subscribe(() => this.composer().prompt.set(this.element.nativeElement.value));\n\n // any time the prompt changes, update the input value if needed\n explicitEffect(\n [this.composer().prompt],\n ([prompt]) => (this.element.nativeElement.value = prompt),\n );\n }\n\n /**\n * If the user presses Enter, the form will be submitted, unless they are holding Shift.\n * This directive automatically handles that behavior.\n */\n @HostListener('keydown.enter', ['$event'])\n protected onEnterKey(event: KeyboardEvent): void {\n if (event.shiftKey) {\n return;\n }\n\n event.preventDefault();\n\n // if there is no text content, do nothing\n if (this.element.nativeElement.value.trim().length === 0) {\n return;\n }\n\n this.composer().submitPrompt();\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpPromptComposerSubmit } from './prompt-composer-submit';\n\n/**\n * The state token for the PromptComposerSubmit primitive.\n */\nexport const NgpPromptComposerSubmitStateToken =\n createStateToken<NgpPromptComposerSubmit>('PromptComposerSubmit');\n\n/**\n * Provides the PromptComposerSubmit state.\n */\nexport const providePromptComposerSubmitState = createStateProvider(\n NgpPromptComposerSubmitStateToken,\n);\n\n/**\n * Injects the PromptComposerSubmit state.\n */\nexport const injectPromptComposerSubmitState = createStateInjector<NgpPromptComposerSubmit>(\n NgpPromptComposerSubmitStateToken,\n);\n\n/**\n * The PromptComposerSubmit state registration function.\n */\nexport const promptComposerSubmitState = createState(NgpPromptComposerSubmitStateToken);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, HostListener, input } from '@angular/core';\nimport { setupButton } from 'ng-primitives/button';\nimport { injectPromptComposerState } from '../prompt-composer/prompt-composer-state';\nimport {\n promptComposerSubmitState,\n providePromptComposerSubmitState,\n} from './prompt-composer-submit-state';\n\n@Directive({\n selector: 'button[ngpPromptComposerSubmit]',\n exportAs: 'ngpPromptComposerSubmit',\n providers: [providePromptComposerSubmitState()],\n host: {\n type: 'button',\n '[attr.data-prompt]': 'composer().hasPrompt() ? \"\" : null',\n '[attr.data-dictating]': 'isDictating() ? \"\" : null',\n '[attr.data-dictation-supported]': 'composer().dictationSupported ? \"\" : null',\n },\n})\nexport class NgpPromptComposerSubmit {\n protected readonly composer = injectPromptComposerState();\n\n /** Whether the submit button should be disabled */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n });\n\n /** Whether dictation is currently active */\n readonly isDictating = computed(() => this.composer().isDictating());\n\n /** The state of the prompt composer submit. */\n protected readonly state = promptComposerSubmitState<NgpPromptComposerSubmit>(this);\n\n constructor() {\n setupButton({\n disabled: computed(() => this.state.disabled() || this.composer().hasPrompt() === false),\n });\n }\n\n @HostListener('click')\n protected onClick(): void {\n this.composer().submitPrompt();\n }\n}\n","import { computed, Directive, output, signal } from '@angular/core';\nimport { injectThreadState } from '../thread/thread-state';\nimport { promptComposerState, providePromptComposerState } from './prompt-composer-state';\n\n@Directive({\n selector: '[ngpPromptComposer]',\n exportAs: 'ngpPromptComposer',\n providers: [providePromptComposerState()],\n host: {\n '[attr.data-prompt]': 'hasPrompt() ? \"\" : null',\n '[attr.data-dictating]': 'isDictating() ? \"\" : null',\n '[attr.data-dictation-supported]': 'dictationSupported ? \"\" : null',\n },\n})\nexport class NgpPromptComposer {\n private readonly thread = injectThreadState();\n\n /** Emits whenever the user submits the prompt. */\n readonly submit = output<string>({ alias: 'ngpPromptComposerSubmit' });\n\n /** @internal Store the current prompt text. */\n readonly prompt = signal<string>('');\n\n /** @internal Track whether the prompt is currently being dictated */\n readonly isDictating = signal<boolean>(false);\n\n /** @internal Determine whether the prompt input has content */\n readonly hasPrompt = computed(() => this.prompt().trim().length > 0);\n\n /** Whether dictation is supported by the browser */\n readonly dictationSupported = !!(\n (globalThis as any).SpeechRecognition || (globalThis as any).webkitSpeechRecognition\n );\n\n /** The state of the prompt composer. */\n protected readonly state = promptComposerState<NgpPromptComposer>(this);\n\n /**\n * @internal\n * Submits the current prompt if there is content, and clears the input.\n */\n submitPrompt(): void {\n if (this.hasPrompt()) {\n this.submit.emit(this.prompt());\n this.prompt.set('');\n this.thread().scrollToBottom('smooth');\n }\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpThreadMessage } from './thread-message';\n\n/**\n * The state token for the ThreadMessage primitive.\n */\nexport const NgpThreadMessageStateToken = createStateToken<NgpThreadMessage>('ThreadMessage');\n\n/**\n * Provides the ThreadMessage state.\n */\nexport const provideThreadMessageState = createStateProvider(NgpThreadMessageStateToken);\n\n/**\n * Injects the ThreadMessage state.\n */\nexport const injectThreadMessageState = createStateInjector<NgpThreadMessage>(\n NgpThreadMessageStateToken,\n);\n\n/**\n * The ThreadMessage state registration function.\n */\nexport const threadMessageState = createState(NgpThreadMessageStateToken);\n","import { DestroyRef, Directive, ElementRef, inject } from '@angular/core';\nimport { fromMutationObserver } from 'ng-primitives/internal';\nimport { safeTakeUntilDestroyed } from 'ng-primitives/utils';\nimport { injectThreadState } from '../thread/thread-state';\nimport { provideThreadMessageState, threadMessageState } from './thread-message-state';\n\n@Directive({\n selector: '[ngpThreadMessage]',\n exportAs: 'ngpThreadMessage',\n providers: [provideThreadMessageState()],\n})\nexport class NgpThreadMessage {\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly destroyRef = inject(DestroyRef);\n private readonly thread = injectThreadState();\n\n /** The state of the thread message. */\n protected readonly state = threadMessageState<NgpThreadMessage>(this);\n\n constructor() {\n // Watch for content changes (like streaming text) and maintain scroll position\n fromMutationObserver(this.elementRef.nativeElement, {\n childList: true, // Watch for new/removed child nodes\n subtree: true, // Watch changes in all descendants\n characterData: true, // Watch for text content changes in text nodes\n attributes: false, // We don't care about attribute changes for content streaming\n })\n .pipe(safeTakeUntilDestroyed())\n .subscribe(() => {\n // if this is the last message, scroll to bottom\n if (this.thread().isLastMessage(this)) {\n this.thread().scrollToBottom('smooth');\n }\n });\n\n this.thread().registerMessage(this);\n this.destroyRef.onDestroy(() => this.thread().unregisterMessage(this));\n }\n}\n","import { Directive } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { NgpThreadMessage } from '../thread-message/thread-message';\nimport { provideThreadState, threadState } from './thread-state';\n\n@Directive({\n selector: '[ngpThread]',\n exportAs: 'ngpThread',\n providers: [provideThreadState()],\n})\nexport class NgpThread {\n private messages: NgpThreadMessage[] = [];\n\n /** @internal emit event to trigger scrolling to bottom */\n readonly scrollRequest = new Subject<ScrollBehavior>();\n\n /** @internal emit event to trigger setting the prompt */\n readonly requestPrompt = new Subject<string>();\n\n /** The state of the thread. */\n protected readonly state = threadState<NgpThread>(this);\n\n scrollToBottom(behavior: ScrollBehavior): void {\n this.scrollRequest.next(behavior);\n }\n\n /** @internal Register a message with the thread */\n registerMessage(message: NgpThreadMessage): void {\n this.messages.push(message);\n }\n\n /** @internal Unregister a message from the thread */\n unregisterMessage(message: NgpThreadMessage): void {\n this.messages = this.messages.filter(m => m !== message);\n }\n\n /** @internal Determine if the given message is the last message in the thread */\n isLastMessage(message: NgpThreadMessage): boolean {\n return this.messages.length > 0 && this.messages[this.messages.length - 1] === message;\n }\n\n /** @internal Set the prompt text in the associated prompt composer */\n setPrompt(value: string): void {\n this.requestPrompt.next(value);\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpPromptComposerDictation } from './prompt-composer-dictation';\n\n/**\n * The state token for the PromptComposerDictation primitive.\n */\nexport const NgpPromptComposerDictationStateToken =\n createStateToken<NgpPromptComposerDictation>('PromptComposerDictation');\n\n/**\n * Provides the PromptComposerDictation state.\n */\nexport const providePromptComposerDictationState = createStateProvider(\n NgpPromptComposerDictationStateToken,\n);\n\n/**\n * Injects the PromptComposerDictation state.\n */\nexport const injectPromptComposerDictationState = createStateInjector<NgpPromptComposerDictation>(\n NgpPromptComposerDictationStateToken,\n);\n\n/**\n * The PromptComposerDictation state registration function.\n */\nexport const promptComposerDictationState = createState(NgpPromptComposerDictationStateToken);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n HostListener,\n input,\n OnDestroy,\n signal,\n} from '@angular/core';\nimport { setupButton } from 'ng-primitives/button';\nimport { injectPromptComposerState } from '../prompt-composer/prompt-composer-state';\nimport {\n promptComposerDictationState,\n providePromptComposerDictationState,\n} from './prompt-composer-dictation-state';\n\ndeclare global {\n interface Window {\n SpeechRecognition: any;\n webkitSpeechRecognition: any;\n }\n}\n\n@Directive({\n selector: 'button[ngpPromptComposerDictation]',\n exportAs: 'ngpPromptComposerDictation',\n providers: [providePromptComposerDictationState()],\n host: {\n type: 'button',\n '[attr.data-dictating]': 'isDictating() ? \"\" : null',\n '[attr.data-dictation-supported]': 'composer().dictationSupported ? \"\" : null',\n '[attr.data-prompt]': 'composer().hasPrompt() ? \"\" : null',\n },\n})\nexport class NgpPromptComposerDictation implements OnDestroy {\n protected readonly composer = injectPromptComposerState();\n private recognition: any = null;\n private basePrompt = signal<string>(''); // Store the prompt before dictation started\n\n /** Whether the submit button should be disabled. */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n });\n\n /** Whether dictation is currently active */\n readonly isDictating = computed(() => this.composer().isDictating());\n\n /** The state of the prompt composer. */\n protected readonly state = promptComposerDictationState<NgpPromptComposerDictation>(this);\n\n constructor() {\n setupButton({\n disabled: computed(\n () => this.state.disabled() || this.composer().dictationSupported === false,\n ),\n });\n this.initializeSpeechRecognition();\n }\n\n ngOnDestroy(): void {\n if (this.recognition) {\n this.recognition.stop();\n this.recognition = null;\n }\n }\n\n @HostListener('click')\n protected onClick(): void {\n if (!this.recognition) {\n console.warn('Speech recognition is not supported in this browser');\n return;\n }\n\n if (this.composer().isDictating()) {\n this.stopDictation();\n } else {\n this.startDictation();\n }\n }\n\n @HostListener('document:keydown', ['$event'])\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && this.composer().isDictating()) {\n event.preventDefault();\n this.stopDictation();\n }\n }\n\n private initializeSpeechRecognition(): void {\n const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;\n\n if (!SpeechRecognition) {\n return;\n }\n\n this.recognition = new SpeechRecognition();\n this.recognition.continuous = true; // Enable continuous listening\n this.recognition.interimResults = true; // Enable interim results for live updates\n this.recognition.lang = 'en-US';\n\n this.recognition.onstart = () => {\n this.composer().isDictating.set(true);\n // Store the current prompt as the base\n this.basePrompt.set(this.composer().prompt());\n };\n\n this.recognition.onresult = (event: any) => {\n let interimTranscript = '';\n let finalTranscript = '';\n\n // Process all results\n for (let i = 0; i < event.results.length; i++) {\n const transcript = event.results[i][0].transcript;\n if (event.results[i].isFinal) {\n finalTranscript += transcript;\n } else {\n interimTranscript += transcript;\n }\n }\n\n // Combine base prompt with final transcript and interim transcript\n const baseText = this.basePrompt();\n const separator = baseText ? ' ' : '';\n const newPrompt = baseText + separator + finalTranscript + interimTranscript;\n\n this.composer().prompt.set(newPrompt.trim());\n };\n\n this.recognition.onend = () => {\n this.composer().isDictating.set(false);\n };\n\n this.recognition.onerror = (event: any) => {\n console.error('Speech recognition error:', event.error);\n this.composer().isDictating.set(false);\n };\n }\n\n private startDictation(): void {\n if (this.recognition && !this.composer().isDictating()) {\n this.recognition.start();\n }\n }\n\n private stopDictation(): void {\n if (this.recognition && this.composer().isDictating()) {\n this.recognition.stop();\n }\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpThreadViewport } from './thread-viewport';\n\n/**\n * The state token for the ThreadViewport primitive.\n */\nexport const NgpThreadViewportStateToken = createStateToken<NgpThreadViewport>('ThreadViewport');\n\n/**\n * Provides the ThreadViewport state.\n */\nexport const provideThreadViewportState = createStateProvider(NgpThreadViewportStateToken);\n\n/**\n * Injects the ThreadViewport state.\n */\nexport const injectThreadViewportState = createStateInjector<NgpThreadViewport>(\n NgpThreadViewportStateToken,\n);\n\n/**\n * The ThreadViewport state registration function.\n */\nexport const threadViewportState = createState(NgpThreadViewportStateToken);\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n Directive,\n ElementRef,\n HostListener,\n inject,\n input,\n numberAttribute,\n} from '@angular/core';\nimport { fromResizeEvent } from 'ng-primitives/internal';\nimport { safeTakeUntilDestroyed } from 'ng-primitives/utils';\nimport { injectThreadState } from '../thread/thread-state';\nimport { provideThreadViewportState, threadViewportState } from './thread-viewport-state';\n\n@Directive({\n selector: '[ngpThreadViewport]',\n exportAs: 'ngpThreadViewport',\n providers: [provideThreadViewportState()],\n})\nexport class NgpThreadViewport {\n private readonly thread = injectThreadState();\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /**\n * The distance in pixels from the bottom of the scrollable container that is considered \"at the bottom\".\n * When the user scrolls within this threshold, the thread is treated as being at the bottom.\n * This value is used to determine whether automatic scrolling to the bottom should occur,\n * for example when new content is added or the container is resized.\n *\n * @default 70\n */\n readonly threshold = input<number, NumberInput>(70, {\n alias: 'ngpThreadViewportThreshold',\n transform: numberAttribute,\n });\n\n /**\n * Whether the thread should automatically scroll to the bottom when new content is added.\n */\n readonly autoScroll = input<boolean, BooleanInput>(true, {\n alias: 'ngpThreadViewportAutoScroll',\n transform: booleanAttribute,\n });\n\n /** Store the last known scroll position */\n private lastScrollTop = 0;\n\n /** Determine if we are at the bottom of the scrollable container (within the threshold) */\n protected isAtBottom = false;\n\n /** The state of the thread viewport. */\n protected readonly state = threadViewportState<NgpThreadViewport>(this);\n\n constructor() {\n // listen for scroll requests from the thread\n this.thread()\n .scrollRequest.pipe(safeTakeUntilDestroyed())\n .subscribe(behavior => this.scrollToBottom(behavior));\n\n fromResizeEvent(this.elementRef.nativeElement)\n .pipe(safeTakeUntilDestroyed())\n .subscribe(() => {\n if (this.isAtBottom) {\n this.scrollToBottom('instant');\n }\n this.onScroll();\n });\n }\n\n /**\n * Scroll the container to the bottom.\n * @internal\n */\n scrollToBottom(behavior: ScrollBehavior): void {\n if (!this.state.autoScroll()) {\n return;\n }\n\n this.elementRef.nativeElement.scrollTo({\n top: this.elementRef.nativeElement.scrollHeight,\n behavior,\n });\n }\n\n @HostListener('scroll')\n protected onScroll(): void {\n const element = this.elementRef.nativeElement;\n const isAtBottom = element.scrollHeight - element.scrollTop <= element.clientHeight;\n\n if (isAtBottom || this.lastScrollTop >= element.scrollTop) {\n this.isAtBottom = isAtBottom;\n }\n\n this.lastScrollTop = element.scrollTop;\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpThreadSuggestion } from './thread-suggestion';\n\n/**\n * The state token for the ThreadSuggestion primitive.\n */\nexport const NgpThreadSuggestionStateToken =\n createStateToken<NgpThreadSuggestion>('ThreadSuggestion');\n\n/**\n * Provides the ThreadSuggestion state.\n */\nexport const provideThreadSuggestionState = createStateProvider(NgpThreadSuggestionStateToken);\n\n/**\n * Injects the ThreadSuggestion state.\n */\nexport const injectThreadSuggestionState = createStateInjector<NgpThreadSuggestion>(\n NgpThreadSuggestionStateToken,\n);\n\n/**\n * The ThreadSuggestion state registration function.\n */\nexport const threadSuggestionState = createState(NgpThreadSuggestionStateToken);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, HostListener, input } from '@angular/core';\nimport { injectThreadState } from '../thread/thread-state';\nimport { provideThreadSuggestionState, threadSuggestionState } from './thread-suggestion-state';\n\n@Directive({\n selector: 'button[ngpThreadSuggestion]',\n exportAs: 'ngpThreadSuggestion',\n providers: [provideThreadSuggestionState()],\n})\nexport class NgpThreadSuggestion {\n private readonly thread = injectThreadState();\n\n /** The suggested text to display in the input field. */\n readonly suggestion = input<string>('', { alias: 'ngpThreadSuggestion' });\n\n /** Whether the suggestion should populate the prompt when clicked. */\n readonly setPromptOnClick = input<boolean, BooleanInput>(true, {\n alias: 'ngpThreadSuggestionSetPromptOnClick',\n transform: booleanAttribute,\n });\n\n /** The state of the thread suggestion. */\n protected readonly state = threadSuggestionState<NgpThreadSuggestion>(this);\n\n @HostListener('click')\n submitSuggestion(): void {\n if (this.state.setPromptOnClick() && this.state.suggestion().length > 0) {\n this.thread().setPrompt(this.state.suggestion());\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAQA;;AAEG;AACI,MAAM,2BAA2B,GAAG,gBAAgB,CAAoB,gBAAgB,CAAC;AAEhG;;AAEG;MACU,0BAA0B,GAAG,mBAAmB,CAAC,2BAA2B;AAEzF;;AAEG;MACU,yBAAyB,GAAG,mBAAmB,CAC1D,2BAA2B;AAG7B;;AAEG;AACI,MAAM,mBAAmB,GAAG,WAAW,CAAC,2BAA2B,CAAC;;ACpB3E;;AAEG;AACI,MAAM,mBAAmB,GAAG,gBAAgB,CAAY,QAAQ,CAAC;AAExE;;AAEG;MACU,kBAAkB,GAAG,mBAAmB,CAAC,mBAAmB;AAEzE;;AAEG;MACU,iBAAiB,GAAG,mBAAmB,CAAY,mBAAmB;AAEnF;;AAEG;AACI,MAAM,WAAW,GAAG,WAAW,CAAC,mBAAmB,CAAC;;AClB3D;;AAEG;AACI,MAAM,gCAAgC,GAC3C,gBAAgB,CAAyB,qBAAqB,CAAC;AAEjE;;AAEG;MACU,+BAA+B,GAAG,mBAAmB,CAChE,gCAAgC;AAGlC;;AAEG;MACU,8BAA8B,GAAG,mBAAmB,CAC/D,gCAAgC;AAGlC;;AAEG;AACI,MAAM,wBAAwB,GAAG,WAAW,CAAC,gCAAgC,CAAC;;MCfxE,sBAAsB,CAAA;AAQjC,IAAA,WAAA,GAAA;QAPmB,IAAA,CAAA,MAAM,GAAG,iBAAiB,EAAE;QAC9B,IAAA,CAAA,QAAQ,GAAG,yBAAyB,EAAE;QACtC,IAAA,CAAA,OAAO,GAAG,gBAAgB,EAA0C;;AAGlE,QAAA,IAAA,CAAA,K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|
280
280
|
args: ['pointerdown', ['$event']]
|
|
281
281
|
}] } });
|
|
282
282
|
|
|
283
|
+
/**
|
|
284
|
+
* Check if all regular options (excluding 'all' and undefined) are selected.
|
|
285
|
+
* @param options All available options
|
|
286
|
+
* @param selectedValues Currently selected values
|
|
287
|
+
* @param compareWith Comparison function
|
|
288
|
+
* @returns true if all regular options are selected
|
|
289
|
+
*/
|
|
290
|
+
function areAllOptionsSelected(options, selectedValues, compareWith) {
|
|
291
|
+
const regularOptions = options.filter(opt => opt.value() !== 'all' && opt.value() !== undefined);
|
|
292
|
+
return (regularOptions.length > 0 &&
|
|
293
|
+
regularOptions.every(opt => selectedValues.some(val => compareWith(val, opt.value()))));
|
|
294
|
+
}
|
|
295
|
+
|
|
283
296
|
class NgpComboboxOption {
|
|
284
297
|
constructor() {
|
|
285
298
|
/** Access the combobox state. */
|
|
@@ -308,13 +321,25 @@ class NgpComboboxOption {
|
|
|
308
321
|
/** Whether this option is selected. */
|
|
309
322
|
this.selected = computed(() => {
|
|
310
323
|
const value = this.value();
|
|
324
|
+
const stateValue = this.state().value();
|
|
311
325
|
if (!value) {
|
|
312
326
|
return false;
|
|
313
327
|
}
|
|
328
|
+
// Handle select all functionality - only works in multiple selection mode
|
|
329
|
+
if (value === 'all') {
|
|
330
|
+
if (!this.state().multiple()) {
|
|
331
|
+
return false; // Never selected in single selection mode
|
|
332
|
+
}
|
|
333
|
+
const selectedValues = Array.isArray(stateValue) ? stateValue : [];
|
|
334
|
+
return areAllOptionsSelected(this.state().options(), selectedValues, this.state().compareWith());
|
|
335
|
+
}
|
|
336
|
+
if (!stateValue) {
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
314
339
|
if (this.state().multiple()) {
|
|
315
|
-
return (Array.isArray(
|
|
340
|
+
return (Array.isArray(stateValue) && stateValue.some(v => this.state().compareWith()(value, v)));
|
|
316
341
|
}
|
|
317
|
-
return this.state().compareWith()(value,
|
|
342
|
+
return this.state().compareWith()(value, stateValue);
|
|
318
343
|
});
|
|
319
344
|
this.state().registerOption(this);
|
|
320
345
|
setupInteractions({
|
|
@@ -661,6 +686,18 @@ class NgpCombobox {
|
|
|
661
686
|
this.closeDropdown();
|
|
662
687
|
return;
|
|
663
688
|
}
|
|
689
|
+
// Handle select all functionality - only works in multiple selection mode
|
|
690
|
+
if (option.value() === 'all') {
|
|
691
|
+
if (!this.state.multiple()) {
|
|
692
|
+
return; // Do nothing in single selection mode
|
|
693
|
+
}
|
|
694
|
+
// Get currently visible regular options (respects filtering)
|
|
695
|
+
const regularOptions = this.options().filter(opt => opt.value() !== 'all' && opt.value() !== undefined);
|
|
696
|
+
const allValues = regularOptions.map(opt => opt.value());
|
|
697
|
+
this.state.value.set(allValues);
|
|
698
|
+
this.valueChange.emit(allValues);
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
664
701
|
if (this.state.multiple()) {
|
|
665
702
|
// if the option is already selected, do nothing
|
|
666
703
|
if (this.isOptionSelected(option)) {
|
|
@@ -692,6 +729,15 @@ class NgpCombobox {
|
|
|
692
729
|
if (!this.state.multiple() && !this.state.allowDeselect()) {
|
|
693
730
|
return;
|
|
694
731
|
}
|
|
732
|
+
// Handle select all for deselect all functionality - only works in multiple selection mode
|
|
733
|
+
if (option.value() === 'all') {
|
|
734
|
+
if (!this.state.multiple()) {
|
|
735
|
+
return; // Do nothing in single selection mode
|
|
736
|
+
}
|
|
737
|
+
this.state.value.set([]);
|
|
738
|
+
this.valueChange.emit([]);
|
|
739
|
+
return;
|
|
740
|
+
}
|
|
695
741
|
if (this.state.multiple()) {
|
|
696
742
|
const values = this.state.value() ?? [];
|
|
697
743
|
const newValue = values.filter(v => !this.state.compareWith()(v, option.value()));
|
|
@@ -714,6 +760,19 @@ class NgpCombobox {
|
|
|
714
760
|
if (this.state.disabled()) {
|
|
715
761
|
return;
|
|
716
762
|
}
|
|
763
|
+
// Handle select all for select/deselect all functionality - only works in multiple selection mode
|
|
764
|
+
if (option.value() === 'all') {
|
|
765
|
+
if (!this.state.multiple()) {
|
|
766
|
+
return; // Do nothing in single selection mode
|
|
767
|
+
}
|
|
768
|
+
if (this.isOptionSelected(option)) {
|
|
769
|
+
this.deselectOption(option);
|
|
770
|
+
}
|
|
771
|
+
else {
|
|
772
|
+
this.selectOption(option);
|
|
773
|
+
}
|
|
774
|
+
return;
|
|
775
|
+
}
|
|
717
776
|
if (this.state.multiple()) {
|
|
718
777
|
// In multiple selection mode, always allow toggling
|
|
719
778
|
if (this.isOptionSelected(option)) {
|
|
@@ -745,14 +804,23 @@ class NgpCombobox {
|
|
|
745
804
|
if (this.state.disabled()) {
|
|
746
805
|
return false;
|
|
747
806
|
}
|
|
807
|
+
const optionValue = option.value();
|
|
748
808
|
const value = this.state.value();
|
|
809
|
+
// Handle select all functionality - only works in multiple selection mode
|
|
810
|
+
if (optionValue === 'all') {
|
|
811
|
+
if (!this.state.multiple()) {
|
|
812
|
+
return false; // Never selected in single selection mode
|
|
813
|
+
}
|
|
814
|
+
const selectedValues = Array.isArray(value) ? value : [];
|
|
815
|
+
return areAllOptionsSelected(this.options(), selectedValues, this.state.compareWith());
|
|
816
|
+
}
|
|
749
817
|
if (!value) {
|
|
750
818
|
return false;
|
|
751
819
|
}
|
|
752
820
|
if (this.state.multiple()) {
|
|
753
|
-
return value && value.some(v => this.state.compareWith()(
|
|
821
|
+
return value && value.some(v => this.state.compareWith()(optionValue, v));
|
|
754
822
|
}
|
|
755
|
-
return this.state.compareWith()(
|
|
823
|
+
return this.state.compareWith()(optionValue, value);
|
|
756
824
|
}
|
|
757
825
|
/**
|
|
758
826
|
* Activate the next option in the list if there is one.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-combobox.mjs","sources":["../../../../packages/ng-primitives/combobox/src/combobox/combobox-state.ts","../../../../packages/ng-primitives/combobox/src/combobox-button/combobox-button.ts","../../../../packages/ng-primitives/combobox/src/combobox-dropdown/combobox-dropdown.ts","../../../../packages/ng-primitives/combobox/src/combobox-input/combobox-input.ts","../../../../packages/ng-primitives/combobox/src/combobox-option/combobox-option.ts","../../../../packages/ng-primitives/combobox/src/combobox-portal/combobox-portal.ts","../../../../packages/ng-primitives/combobox/src/config/combobox-config.ts","../../../../packages/ng-primitives/combobox/src/combobox/combobox.ts","../../../../packages/ng-primitives/combobox/src/ng-primitives-combobox.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpCombobox } from './combobox';\n\n/**\n * The state token for the Combobox primitive.\n */\nexport const NgpComboboxStateToken = createStateToken<NgpCombobox>('Combobox');\n\n/**\n * Provides the Combobox state.\n */\nexport const provideComboboxState = createStateProvider(NgpComboboxStateToken);\n\n/**\n * Injects the Combobox state.\n */\nexport const injectComboboxState = createStateInjector<NgpCombobox>(NgpComboboxStateToken);\n\n/**\n * The Combobox state registration function.\n */\nexport const comboboxState = createState(NgpComboboxStateToken);\n","import { computed, Directive, HostListener, input } from '@angular/core';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxButton]',\n exportAs: 'ngpComboboxButton',\n host: {\n type: 'button',\n tabindex: '-1',\n 'aria-haspopup': 'listbox',\n '[id]': 'id()',\n '[attr.aria-controls]': 'dropdownId()',\n '[attr.aria-expanded]': 'state().open()',\n '[attr.data-open]': 'state().open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state().multiple() ? \"\" : undefined',\n '[disabled]': 'state().disabled()',\n },\n})\nexport class NgpComboboxButton {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef<HTMLButtonElement>();\n\n /** The id of the button. */\n readonly id = input<string>(uniqueId('ngp-combobox-button'));\n\n /** The id of the dropdown. */\n readonly dropdownId = computed(() => this.state().dropdown()?.id());\n\n constructor() {\n setupInteractions({\n hover: true,\n press: true,\n disabled: this.state().disabled,\n });\n\n this.state().registerButton(this);\n }\n\n @HostListener('click')\n protected async toggleDropdown(): Promise<void> {\n await this.state().toggleDropdown();\n this.state().input()?.focus();\n }\n}\n","import { Directive, input } from '@angular/core';\nimport { injectElementRef, observeResize } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxDropdown]',\n exportAs: 'ngpComboboxDropdown',\n host: {\n role: 'listbox',\n '[id]': 'id()',\n '[style.left.px]': 'state().overlay()?.position()?.x',\n '[style.top.px]': 'state().overlay()?.position()?.y',\n '[style.--ngp-combobox-transform-origin]': 'state().overlay()?.transformOrigin()',\n '[style.--ngp-combobox-width.px]': 'comboboxDimensions().width',\n '[style.--ngp-combobox-input-width.px]': 'inputDimensions().width',\n '[style.--ngp-combobox-button-width.px]': 'buttonDimensions().width',\n },\n})\nexport class NgpComboboxDropdown {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /** The dimensions of the combobox. */\n protected readonly comboboxDimensions = observeResize(\n () => this.state().elementRef.nativeElement,\n );\n\n /** The dimensions of the combobox. */\n protected readonly inputDimensions = observeResize(\n () => this.state().input()?.elementRef.nativeElement,\n );\n\n /** Store the combobox button dimensions. */\n protected readonly buttonDimensions = observeResize(\n () => this.state().button()?.elementRef.nativeElement,\n );\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef();\n\n /** The id of the dropdown. */\n readonly id = input<string>(uniqueId('ngp-combobox-dropdown'));\n\n constructor() {\n this.state().registerDropdown(this);\n }\n}\n","import { computed, Directive, HostListener, input } from '@angular/core';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: 'input[ngpComboboxInput]',\n exportAs: 'ngpComboboxInput',\n host: {\n role: 'combobox',\n type: 'text',\n autocomplete: 'off',\n autocorrect: 'off',\n spellcheck: 'false',\n 'aria-haspopup': 'listbox',\n 'aria-autocomplete': 'list',\n '[id]': 'id()',\n '[attr.aria-controls]': 'state().open() ? dropdownId() : undefined',\n '[attr.aria-expanded]': 'state().open()',\n '[attr.data-open]': 'state().open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state().multiple() ? \"\" : undefined',\n '[attr.aria-activedescendant]': 'activeDescendant()',\n '[disabled]': 'state().disabled()',\n },\n})\nexport class NgpComboboxInput {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef<HTMLInputElement>();\n\n /** The id of the input. */\n readonly id = input<string>(uniqueId('ngp-combobox-input'));\n\n /** The id of the dropdown. */\n readonly dropdownId = computed(() => this.state().dropdown()?.id());\n\n /** The id of the active descendant. */\n protected readonly activeDescendant = computed(() =>\n this.state().activeDescendantManager.activeDescendant(),\n );\n\n /** Determine if the pointer was used to focus the input. */\n protected pointerFocused = false;\n\n /**\n * The control status - this is required as we apply them to the combobox element as well as the input element.\n * @internal\n */\n readonly controlStatus = setupFormControl({ id: this.id, disabled: this.state().disabled });\n\n constructor() {\n setupInteractions({\n focus: true,\n hover: true,\n press: true,\n disabled: this.state().disabled,\n });\n\n this.state().registerInput(this);\n }\n\n /** Handle keydown events for accessibility. */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n switch (event.key) {\n case 'ArrowDown':\n if (this.state().open()) {\n this.state().activateNextOption();\n } else {\n this.state().openDropdown();\n }\n event.preventDefault();\n break;\n case 'ArrowUp':\n if (this.state().open()) {\n this.state().activatePreviousOption();\n } else {\n this.state().openDropdown();\n this.state().activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Home':\n if (this.state().open()) {\n this.state().activeDescendantManager.first();\n }\n event.preventDefault();\n break;\n case 'End':\n if (this.state().open()) {\n this.state().activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Enter':\n if (this.state().open()) {\n const activeItem = this.state().activeDescendantManager.activeItem();\n if (activeItem) {\n this.state().toggleOption(activeItem);\n }\n }\n event.preventDefault();\n break;\n case 'Escape':\n this.state().closeDropdown();\n event.preventDefault();\n break;\n case 'Backspace':\n // if the input is not empty then open the dropdown\n if (this.elementRef.nativeElement.value.length > 0) {\n this.state().openDropdown();\n }\n break;\n default:\n // Ignore keys with length > 1 (e.g., 'Shift', 'ArrowLeft', 'Enter', etc.)\n // Filter out control/meta key combos (e.g., Ctrl+C)\n if (event.key.length > 1 || event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n\n // if this was a character key, we want to open the dropdown\n this.state().openDropdown();\n }\n }\n\n @HostListener('blur', ['$event'])\n protected closeDropdown(event: FocusEvent): void {\n const relatedTarget = event.relatedTarget as HTMLElement;\n\n // if the blur was caused by focus moving to the dropdown, don't close\n if (\n relatedTarget &&\n this.state().dropdown()?.elementRef.nativeElement.contains(relatedTarget)\n ) {\n return;\n }\n\n // if the blur was caused by focus moving to the button, don't close\n if (relatedTarget && this.state().button()?.elementRef.nativeElement.contains(relatedTarget)) {\n return;\n }\n\n this.state().closeDropdown();\n event.preventDefault();\n }\n\n /**\n * Focus the input field\n * @internal\n */\n focus(): void {\n this.elementRef.nativeElement.focus({ preventScroll: true });\n }\n\n @HostListener('focus', ['$event'])\n protected highlightText(): void {\n if (this.pointerFocused) {\n this.pointerFocused = false;\n return;\n }\n\n // highlight the text in the input\n this.elementRef.nativeElement.setSelectionRange(0, this.elementRef.nativeElement.value.length);\n }\n\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(): void {\n this.pointerFocused = true;\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n HostListener,\n input,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { NgpActivatable } from 'ng-primitives/a11y';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxOption]',\n exportAs: 'ngpComboboxOption',\n host: {\n role: 'option',\n '[id]': 'id()',\n '[attr.tabindex]': '-1',\n '[attr.aria-selected]': 'selected() ? \"true\" : undefined',\n '[attr.data-selected]': 'selected() ? \"\" : undefined',\n '[attr.data-active]': 'active() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '(click)': 'select()',\n },\n})\nexport class NgpComboboxOption implements OnInit, OnDestroy, NgpActivatable {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /**\n * The element reference of the option.\n * @internal\n */\n readonly elementRef = injectElementRef();\n\n /** The id of the option. */\n readonly id = input<string>(uniqueId('ngp-combobox-option'));\n\n /** @required The value of the option. */\n readonly value = input<any>(undefined, {\n alias: 'ngpComboboxOptionValue',\n });\n\n /** The disabled state of the option. */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxOptionDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Whether this option is the active descendant.\n * @internal\n */\n protected readonly active = computed(\n () => this.state().activeDescendantManager.activeDescendant() === this.id(),\n );\n\n /** Whether this option is selected. */\n protected readonly selected = computed(() => {\n const value = this.value();\n\n if (!value) {\n return false;\n }\n\n if (this.state().multiple()) {\n return (\n Array.isArray(value) && value.some(v => this.state().compareWith()(v, this.state().value()))\n );\n }\n\n return this.state().compareWith()(value, this.state().value());\n });\n\n constructor() {\n this.state().registerOption(this);\n\n setupInteractions({\n hover: true,\n press: true,\n disabled: this.disabled,\n });\n }\n\n ngOnInit(): void {\n if (this.value() === undefined) {\n throw new Error(\n 'ngpComboboxOption: The value input is required. Please provide a value for the option.',\n );\n }\n }\n\n ngOnDestroy(): void {\n this.state().unregisterOption(this);\n }\n\n /**\n * Select the option.\n * @internal\n */\n select(): void {\n if (this.disabled()) {\n return;\n }\n\n this.state().toggleOption(this);\n }\n\n /**\n * Scroll the option into view.\n * @internal\n */\n scrollIntoView(): void {\n this.elementRef.nativeElement.scrollIntoView({ block: 'nearest' });\n }\n\n /**\n * Whenever the pointer enters the option, activate it.\n * @internal\n */\n @HostListener('pointerenter')\n protected onPointerEnter(): void {\n this.state().activeDescendantManager.activate(this);\n }\n\n /**\n * Whenever the pointer leaves the option, deactivate it.\n * @internal\n */\n @HostListener('pointerleave')\n protected onPointerLeave(): void {\n this.state().activeDescendantManager.activate(undefined);\n }\n}\n","import {\n Directive,\n inject,\n Injector,\n OnDestroy,\n signal,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { createOverlay, NgpOverlay, NgpOverlayConfig } from 'ng-primitives/portal';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxPortal]',\n exportAs: 'ngpComboboxPortal',\n})\nexport class NgpComboboxPortal implements OnDestroy {\n /** Access the combobox state. */\n private readonly state = injectComboboxState();\n /** Access the view container reference. */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /** Access the template reference. */\n private readonly templateRef = inject(TemplateRef);\n\n /** Access the injector. */\n private readonly injector = inject(Injector);\n\n /**\n * The overlay that manages the popover\n * @internal\n */\n readonly overlay = signal<NgpOverlay<void> | null>(null);\n\n constructor() {\n this.state().registerPortal(this);\n }\n\n /** Cleanup the portal. */\n ngOnDestroy(): void {\n this.overlay()?.destroy();\n }\n\n /**\n * Attach the portal.\n * @internal\n */\n show(): Promise<void> {\n // Create the overlay if it doesn't exist yet\n if (!this.overlay()) {\n this.createOverlay();\n }\n\n // Show the overlay\n return this.overlay()!.show();\n }\n\n /**\n * Detach the portal.\n * @internal\n */\n async detach(): Promise<void> {\n this.overlay()?.hide();\n }\n\n /**\n * Create the overlay that will contain the dropdown\n */\n private createOverlay(): void {\n // Create config for the overlay\n const config: NgpOverlayConfig<void> = {\n content: this.templateRef,\n viewContainerRef: this.viewContainerRef,\n triggerElement: this.state().elementRef.nativeElement,\n injector: this.injector,\n placement: this.state().placement(),\n closeOnOutsideClick: true,\n closeOnEscape: true,\n restoreFocus: false,\n scrollBehaviour: 'reposition',\n container: this.state().container(),\n };\n\n this.overlay.set(createOverlay(config));\n }\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\nimport { type NgpComboboxPlacement } from '../combobox/combobox';\n\nexport interface NgpComboboxConfig {\n /**\n * The default placement for the combobox dropdown.\n * @default 'bottom'\n */\n placement: NgpComboboxPlacement;\n\n /**\n * The container element or selector for the combobox dropdown.\n * This can be used to control where the dropdown is rendered in the DOM.\n * @default 'body'\n */\n container: HTMLElement | string | null;\n}\n\nexport const defaultComboboxConfig: NgpComboboxConfig = {\n placement: 'bottom',\n container: 'body',\n};\n\nexport const NgpComboboxConfigToken = new InjectionToken<NgpComboboxConfig>(\n 'NgpComboboxConfigToken',\n);\n\n/**\n * Provide the default Combobox configuration\n * @param config The Combobox configuration\n * @returns The provider\n */\nexport function provideComboboxConfig(config: Partial<NgpComboboxConfig>): Provider[] {\n return [\n {\n provide: NgpComboboxConfigToken,\n useValue: { ...defaultComboboxConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Combobox configuration\n * @returns The global Combobox configuration\n */\nexport function injectComboboxConfig(): NgpComboboxConfig {\n return inject(NgpComboboxConfigToken, { optional: true }) ?? defaultComboboxConfig;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n HostListener,\n inject,\n Injector,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { activeDescendantManager } from 'ng-primitives/a11y';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport type { NgpComboboxButton } from '../combobox-button/combobox-button';\nimport type { NgpComboboxDropdown } from '../combobox-dropdown/combobox-dropdown';\nimport type { NgpComboboxInput } from '../combobox-input/combobox-input';\nimport { NgpComboboxOption } from '../combobox-option/combobox-option';\nimport type { NgpComboboxPortal } from '../combobox-portal/combobox-portal';\nimport { injectComboboxConfig } from '../config/combobox-config';\nimport { comboboxState, provideComboboxState } from './combobox-state';\n\n/**\n * Ideally we would use a generic type here, unfortunately, unlike in React,\n * we cannot infer the type based on another input. For example, if multiple\n * is true, we cannot infer that the value is an array of T. Using a union\n * type is not ideal either because it requires the user to handle multiple cases.\n * Using a generic also isn't ideal because we need to use T as both an array and\n * a single value.\n *\n * Any seems to be used by Angular Material, ng-select, and other libraries\n * so we will use it here as well.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype T = any;\n\n@Directive({\n selector: '[ngpCombobox]',\n exportAs: 'ngpCombobox',\n providers: [provideComboboxState()],\n host: {\n '[attr.tabindex]': 'input() ? -1 : (state.disabled() ? -1 : 0)',\n '[attr.data-open]': 'state.open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state.multiple() ? \"\" : undefined',\n '[attr.data-invalid]': 'controlStatus()?.invalid ? \"\" : undefined',\n '[attr.data-valid]': 'controlStatus()?.valid ? \"\" : undefined',\n '[attr.data-touched]': 'controlStatus()?.touched ? \"\" : undefined',\n '[attr.data-pristine]': 'controlStatus()?.pristine ? \"\" : undefined',\n '[attr.data-dirty]': 'controlStatus()?.dirty ? \"\" : undefined',\n '[attr.data-pending]': 'controlStatus()?.pending ? \"\" : undefined',\n },\n})\nexport class NgpCombobox {\n /** Access the combobox configuration. */\n protected readonly config = injectComboboxConfig();\n\n /** @internal Access the combobox element. */\n readonly elementRef = injectElementRef();\n\n /** Access the injector. */\n protected readonly injector = inject(Injector);\n\n /** The value of the combobox. */\n readonly value = input<T>(undefined, {\n alias: 'ngpComboboxValue',\n });\n\n /** Event emitted when the value changes. */\n readonly valueChange = output<T>({\n alias: 'ngpComboboxValueChange',\n });\n\n /** Whether the combobox is multiple selection. */\n readonly multiple = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxMultiple',\n transform: booleanAttribute,\n });\n\n /** Whether the combobox is disabled. */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxDisabled',\n transform: booleanAttribute,\n });\n\n /** Whether the combobox allows deselection in single selection mode. */\n readonly allowDeselect = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxAllowDeselect',\n transform: booleanAttribute,\n });\n\n /** Emit when the dropdown open state changes. */\n readonly openChange = output<boolean>({\n alias: 'ngpComboboxOpenChange',\n });\n\n /** The comparator function used to compare options. */\n readonly compareWith = input<(a: T | undefined, b: T | undefined) => boolean>(Object.is, {\n alias: 'ngpComboboxCompareWith',\n });\n\n /** The position of the dropdown. */\n readonly placement = input<NgpComboboxPlacement>(this.config.placement, {\n alias: 'ngpComboboxDropdownPlacement',\n });\n\n /** The container for the dropdown. */\n readonly container = input<HTMLElement | string | null>(this.config.container, {\n alias: 'ngpComboboxDropdownContainer',\n });\n\n /**\n * Store the combobox input\n * @internal\n */\n readonly input = signal<NgpComboboxInput | undefined>(undefined);\n\n /**\n * Store the combobox button.\n * @internal\n */\n readonly button = signal<NgpComboboxButton | undefined>(undefined);\n\n /**\n * Store the combobox portal.\n * @internal\n */\n readonly portal = signal<NgpComboboxPortal | undefined>(undefined);\n\n /**\n * Store the combobox dropdown.\n * @internal\n */\n readonly dropdown = signal<NgpComboboxDropdown | undefined>(undefined);\n\n /**\n * Store the combobox options.\n * @internal\n */\n readonly options = signal<NgpComboboxOption[]>([]);\n\n /**\n * Access the overlay\n * @internal\n */\n readonly overlay = computed(() => this.portal()?.overlay());\n\n /**\n * The open state of the combobox.\n * @internal\n */\n readonly open = computed(() => this.overlay()?.isOpen() ?? false);\n\n /**\n * The active key descendant manager.\n * @internal\n */\n readonly activeDescendantManager = activeDescendantManager({\n // we must wrap the signal in a computed to ensure it is not used before it is defined\n disabled: computed(() => this.state.disabled()),\n items: this.options,\n });\n\n /** The control status */\n protected readonly controlStatus = computed(() => this.input()?.controlStatus());\n\n /** The state of the combobox. */\n protected readonly state = comboboxState<NgpCombobox>(this);\n\n constructor() {\n setupInteractions({\n focus: true,\n focusWithin: true,\n hover: true,\n press: true,\n disabled: this.state.disabled,\n });\n\n // any time the active descendant changes, ensure we scroll it into view\n // perform after next render to ensure the DOM is updated\n // e.g. the dropdown is open before the option is scrolled into view\n afterRenderEffect({\n write: () => {\n const isPositioned = this.portal()?.overlay()?.isPositioned() ?? false;\n const activeItem = this.activeDescendantManager.activeItem();\n\n if (!isPositioned || !activeItem) {\n return;\n }\n\n this.activeDescendantManager.activeItem()?.scrollIntoView?.();\n },\n });\n }\n\n /**\n * Open the dropdown.\n * @internal\n */\n async openDropdown(): Promise<void> {\n if (this.state.disabled() || this.open()) {\n return;\n }\n\n this.openChange.emit(true);\n await this.portal()?.show();\n\n // if there is a selected option(s), set the active descendant to the first selected option\n const selectedOption = this.options().find(option => this.isOptionSelected(option));\n\n // if there is no selected option, set the active descendant to the first option\n const targetOption = selectedOption ?? this.options()[0];\n\n // if there is no target option, do nothing\n if (!targetOption) {\n return;\n }\n\n // activate the selected option or the first option\n this.activeDescendantManager.activate(targetOption);\n }\n\n /**\n * Close the dropdown.\n * @internal\n */\n closeDropdown(): void {\n if (!this.open()) {\n return;\n }\n\n this.openChange.emit(false);\n this.portal()?.detach();\n\n // clear the active descendant\n this.activeDescendantManager.reset();\n }\n\n /**\n * Toggle the dropdown.\n * @internal\n */\n async toggleDropdown(): Promise<void> {\n if (this.open()) {\n this.closeDropdown();\n } else {\n await this.openDropdown();\n }\n }\n\n /**\n * Select an option.\n * @param option The option to select.\n * @internal\n */\n selectOption(option: NgpComboboxOption | undefined): void {\n if (this.state.disabled()) {\n return;\n }\n\n if (!option) {\n this.state.value.set(undefined);\n this.closeDropdown();\n return;\n }\n\n if (this.state.multiple()) {\n // if the option is already selected, do nothing\n if (this.isOptionSelected(option)) {\n return;\n }\n\n const value = [...(this.state.value() as T[]), option.value() as T];\n\n // add the option to the value\n this.state.value.set(value as T);\n this.valueChange.emit(value as T);\n } else {\n this.state.value.set(option.value() as T);\n this.valueChange.emit(option.value() as T);\n\n // close the dropdown on single selection\n this.closeDropdown();\n }\n }\n\n /**\n * Deselect an option.\n * @param option The option to deselect.\n * @internal\n */\n deselectOption(option: NgpComboboxOption): void {\n // if the combobox is disabled or the option is not selected, do nothing\n if (this.state.disabled() || !this.isOptionSelected(option)) {\n return;\n }\n\n // in single selection mode, only allow deselecting if allowDeselect is true\n if (!this.state.multiple() && !this.state.allowDeselect()) {\n return;\n }\n\n if (this.state.multiple()) {\n const values = (this.state.value() as T[]) ?? [];\n const newValue = values.filter(v => !this.state.compareWith()(v, option.value() as T));\n\n // remove the option from the value\n this.state.value.set(newValue as T);\n this.valueChange.emit(newValue as T);\n } else {\n // in single selection mode with allowDeselect enabled, set value to undefined\n this.state.value.set(undefined);\n this.valueChange.emit(undefined);\n }\n }\n\n /**\n * Toggle the selection of an option.\n * @param option The option to toggle.\n * @internal\n */\n toggleOption(option: NgpComboboxOption): void {\n if (this.state.disabled()) {\n return;\n }\n\n if (this.state.multiple()) {\n // In multiple selection mode, always allow toggling\n if (this.isOptionSelected(option)) {\n this.deselectOption(option);\n } else {\n this.selectOption(option);\n }\n } else {\n // In single selection mode, check if deselection is allowed\n if (this.isOptionSelected(option) && this.state.allowDeselect()) {\n // Deselect the option by setting value to undefined\n this.state.value.set(undefined);\n this.valueChange.emit(undefined);\n } else {\n // Select the option (works even if already selected to update the input)\n this.selectOption(option);\n }\n }\n }\n\n /**\n * Determine if an option is selected.\n * @param option The option to check.\n * @internal\n */\n isOptionSelected(option: NgpComboboxOption): boolean {\n if (this.state.disabled()) {\n return false;\n }\n\n const value = this.state.value();\n\n if (!value) {\n return false;\n }\n\n if (this.state.multiple()) {\n return value && (value as T[]).some(v => this.state.compareWith()(option.value(), v));\n }\n\n return this.state.compareWith()(option.value(), value);\n }\n\n /**\n * Activate the next option in the list if there is one.\n * If there is no option currently active, activate the selected option or the first option.\n * @internal\n */\n activateNextOption(): void {\n if (this.state.disabled()) {\n return;\n }\n\n const options = this.options();\n\n // if there are no options, do nothing\n if (options.length === 0) {\n return;\n }\n\n // if there is no active option, activate the first option\n if (!this.activeDescendantManager.activeItem()) {\n const selectedOption = options.find(option => this.isOptionSelected(option));\n\n // if there is a selected option(s), set the active descendant to the first selected option\n const targetOption = selectedOption ?? options[0];\n\n this.activeDescendantManager.activate(targetOption);\n return;\n }\n\n // otherwise activate the next option\n this.activeDescendantManager.next();\n }\n\n /**\n * Activate the previous option in the list if there is one.\n * @internal\n */\n activatePreviousOption(): void {\n if (this.state.disabled()) {\n return;\n }\n const options = this.options();\n // if there are no options, do nothing\n if (options.length === 0) {\n return;\n }\n // if there is no active option, activate the last option\n if (!this.activeDescendantManager.activeItem()) {\n const selectedOption = options.find(option => this.isOptionSelected(option));\n // if there is a selected option(s), set the active descendant to the first selected option\n const targetOption = selectedOption ?? options[options.length - 1];\n this.activeDescendantManager.activate(targetOption);\n return;\n }\n // otherwise activate the previous option\n this.activeDescendantManager.previous();\n }\n\n /**\n * Register the dropdown portal with the combobox.\n * @param portal The dropdown portal.\n * @internal\n */\n registerPortal(portal: NgpComboboxPortal): void {\n this.portal.set(portal);\n }\n\n /**\n * Register the combobox input with the combobox.\n * @param input The combobox input.\n * @internal\n */\n registerInput(input: NgpComboboxInput): void {\n this.input.set(input);\n }\n\n /**\n * Register the combobox button with the combobox.\n * @param button The combobox button.\n * @internal\n */\n registerButton(button: NgpComboboxButton): void {\n this.button.set(button);\n }\n\n /**\n * Register the dropdown with the combobox.\n * @param dropdown The dropdown to register.\n * @internal\n */\n registerDropdown(dropdown: NgpComboboxDropdown): void {\n this.dropdown.set(dropdown);\n }\n\n /**\n * Register an option with the combobox.\n * @param option The option to register.\n * @internal\n */\n registerOption(option: NgpComboboxOption): void {\n this.options.update(options => [...options, option]);\n }\n\n /**\n * Unregister an option from the combobox.\n * @param option The option to unregister.\n * @internal\n */\n unregisterOption(option: NgpComboboxOption): void {\n this.options.update(options => options.filter(o => o !== option));\n }\n\n /**\n * Focus the combobox.\n * When an input element is present, it will be focused.\n * Otherwise, the combobox element itself will be focused.\n * This enables keyboard navigation for comboboxes without input elements.\n * @internal\n */\n focus(): void {\n if (this.input()) {\n this.input()?.focus();\n } else {\n this.elementRef.nativeElement.focus();\n }\n }\n\n /**\n * Handle keydown events for keyboard navigation and accessibility.\n * Supports:\n * - Arrow Down: Open dropdown or navigate to next option\n * - Arrow Up: Open dropdown or navigate to previous option\n * - Home: Navigate to first option\n * - End: Navigate to last option\n * - Enter: Select the currently active option\n * - Escape: Close the dropdown\n * @param event - The keyboard event\n * @internal\n */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n // If the event originated from the input element, let the input handle it\n if (this.input() && event.target === this.input()?.elementRef.nativeElement) {\n return;\n }\n\n switch (event.key) {\n case 'ArrowDown':\n if (this.open()) {\n this.activateNextOption();\n } else {\n this.openDropdown();\n }\n event.preventDefault();\n break;\n case 'ArrowUp':\n if (this.open()) {\n this.activatePreviousOption();\n } else {\n this.openDropdown();\n // Use setTimeout to ensure dropdown is rendered before selecting last item\n setTimeout(() => this.activeDescendantManager.last());\n }\n event.preventDefault();\n break;\n case 'Home':\n if (this.open()) {\n this.activeDescendantManager.first();\n }\n event.preventDefault();\n break;\n case 'End':\n if (this.open()) {\n this.activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Enter':\n if (this.open()) {\n this.selectOption(this.activeDescendantManager.activeItem());\n }\n event.preventDefault();\n break;\n case 'Escape':\n if (this.open()) {\n this.closeDropdown();\n }\n event.preventDefault();\n break;\n }\n }\n\n /**\n * Handle blur events to manage dropdown closing behavior.\n * The dropdown will remain open if focus moves to:\n * - The dropdown itself\n * - The combobox button\n * - The combobox input\n * Otherwise, the dropdown will be closed.\n * @param event - The focus event\n * @internal\n */\n @HostListener('blur', ['$event'])\n protected onBlur(event: FocusEvent): void {\n const relatedTarget = event.relatedTarget as HTMLElement;\n\n // if the blur was caused by focus moving to the dropdown, don't close\n if (relatedTarget && this.dropdown()?.elementRef.nativeElement.contains(relatedTarget)) {\n return;\n }\n\n // if the blur was caused by focus moving to the button, don't close\n if (relatedTarget && this.button()?.elementRef.nativeElement.contains(relatedTarget)) {\n return;\n }\n\n // if the blur was caused by focus moving to the input, don't close\n if (relatedTarget && this.input()?.elementRef.nativeElement === relatedTarget) {\n return;\n }\n\n this.closeDropdown();\n }\n}\n\nexport type NgpComboboxPlacement =\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-start'\n | 'top-end'\n | 'right-start'\n | 'right-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'left-start'\n | 'left-end';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAQA;;AAEG;AACI,MAAM,qBAAqB,GAAG,gBAAgB,CAAc,UAAU,CAAC;AAE9E;;AAEG;MACU,oBAAoB,GAAG,mBAAmB,CAAC,qBAAqB;AAE7E;;AAEG;MACU,mBAAmB,GAAG,mBAAmB,CAAc,qBAAqB;AAEzF;;AAEG;AACI,MAAM,aAAa,GAAG,WAAW,CAAC,qBAAqB,CAAC;;MCJlD,iBAAiB,CAAA;AAgB5B,IAAA,WAAA,GAAA;;QAdmB,IAAA,CAAA,KAAK,GAAG,mBAAmB,EAAE;AAEhD;;;AAGG;QACM,IAAA,CAAA,UAAU,GAAG,gBAAgB,EAAqB;;QAGlD,IAAA,CAAA,EAAE,GAAG,KAAK,CAAS,QAAQ,CAAC,qBAAqB,CAAC,CAAC;;AAGnD,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;AAGjE,QAAA,iBAAiB,CAAC;AAChB,YAAA,K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ox/combobox-state.ts","../../../../packages/ng-primitives/combobox/src/combobox-button/combobox-button.ts","../../../../packages/ng-primitives/combobox/src/combobox-dropdown/combobox-dropdown.ts","../../../../packages/ng-primitives/combobox/src/combobox-input/combobox-input.ts","../../../../packages/ng-primitives/combobox/src/utils.ts","../../../../packages/ng-primitives/combobox/src/combobox-option/combobox-option.ts","../../../../packages/ng-primitives/combobox/src/combobox-portal/combobox-portal.ts","../../../../packages/ng-primitives/combobox/src/config/combobox-config.ts","../../../../packages/ng-primitives/combobox/src/combobox/combobox.ts","../../../../packages/ng-primitives/combobox/src/ng-primitives-combobox.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpCombobox } from './combobox';\n\n/**\n * The state token for the Combobox primitive.\n */\nexport const NgpComboboxStateToken = createStateToken<NgpCombobox>('Combobox');\n\n/**\n * Provides the Combobox state.\n */\nexport const provideComboboxState = createStateProvider(NgpComboboxStateToken);\n\n/**\n * Injects the Combobox state.\n */\nexport const injectComboboxState = createStateInjector<NgpCombobox>(NgpComboboxStateToken);\n\n/**\n * The Combobox state registration function.\n */\nexport const comboboxState = createState(NgpComboboxStateToken);\n","import { computed, Directive, HostListener, input } from '@angular/core';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxButton]',\n exportAs: 'ngpComboboxButton',\n host: {\n type: 'button',\n tabindex: '-1',\n 'aria-haspopup': 'listbox',\n '[id]': 'id()',\n '[attr.aria-controls]': 'dropdownId()',\n '[attr.aria-expanded]': 'state().open()',\n '[attr.data-open]': 'state().open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state().multiple() ? \"\" : undefined',\n '[disabled]': 'state().disabled()',\n },\n})\nexport class NgpComboboxButton {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef<HTMLButtonElement>();\n\n /** The id of the button. */\n readonly id = input<string>(uniqueId('ngp-combobox-button'));\n\n /** The id of the dropdown. */\n readonly dropdownId = computed(() => this.state().dropdown()?.id());\n\n constructor() {\n setupInteractions({\n hover: true,\n press: true,\n disabled: this.state().disabled,\n });\n\n this.state().registerButton(this);\n }\n\n @HostListener('click')\n protected async toggleDropdown(): Promise<void> {\n await this.state().toggleDropdown();\n this.state().input()?.focus();\n }\n}\n","import { Directive, input } from '@angular/core';\nimport { injectElementRef, observeResize } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxDropdown]',\n exportAs: 'ngpComboboxDropdown',\n host: {\n role: 'listbox',\n '[id]': 'id()',\n '[style.left.px]': 'state().overlay()?.position()?.x',\n '[style.top.px]': 'state().overlay()?.position()?.y',\n '[style.--ngp-combobox-transform-origin]': 'state().overlay()?.transformOrigin()',\n '[style.--ngp-combobox-width.px]': 'comboboxDimensions().width',\n '[style.--ngp-combobox-input-width.px]': 'inputDimensions().width',\n '[style.--ngp-combobox-button-width.px]': 'buttonDimensions().width',\n },\n})\nexport class NgpComboboxDropdown {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /** The dimensions of the combobox. */\n protected readonly comboboxDimensions = observeResize(\n () => this.state().elementRef.nativeElement,\n );\n\n /** The dimensions of the combobox. */\n protected readonly inputDimensions = observeResize(\n () => this.state().input()?.elementRef.nativeElement,\n );\n\n /** Store the combobox button dimensions. */\n protected readonly buttonDimensions = observeResize(\n () => this.state().button()?.elementRef.nativeElement,\n );\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef();\n\n /** The id of the dropdown. */\n readonly id = input<string>(uniqueId('ngp-combobox-dropdown'));\n\n constructor() {\n this.state().registerDropdown(this);\n }\n}\n","import { computed, Directive, HostListener, input } from '@angular/core';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: 'input[ngpComboboxInput]',\n exportAs: 'ngpComboboxInput',\n host: {\n role: 'combobox',\n type: 'text',\n autocomplete: 'off',\n autocorrect: 'off',\n spellcheck: 'false',\n 'aria-haspopup': 'listbox',\n 'aria-autocomplete': 'list',\n '[id]': 'id()',\n '[attr.aria-controls]': 'state().open() ? dropdownId() : undefined',\n '[attr.aria-expanded]': 'state().open()',\n '[attr.data-open]': 'state().open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state().multiple() ? \"\" : undefined',\n '[attr.aria-activedescendant]': 'activeDescendant()',\n '[disabled]': 'state().disabled()',\n },\n})\nexport class NgpComboboxInput {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef<HTMLInputElement>();\n\n /** The id of the input. */\n readonly id = input<string>(uniqueId('ngp-combobox-input'));\n\n /** The id of the dropdown. */\n readonly dropdownId = computed(() => this.state().dropdown()?.id());\n\n /** The id of the active descendant. */\n protected readonly activeDescendant = computed(() =>\n this.state().activeDescendantManager.activeDescendant(),\n );\n\n /** Determine if the pointer was used to focus the input. */\n protected pointerFocused = false;\n\n /**\n * The control status - this is required as we apply them to the combobox element as well as the input element.\n * @internal\n */\n readonly controlStatus = setupFormControl({ id: this.id, disabled: this.state().disabled });\n\n constructor() {\n setupInteractions({\n focus: true,\n hover: true,\n press: true,\n disabled: this.state().disabled,\n });\n\n this.state().registerInput(this);\n }\n\n /** Handle keydown events for accessibility. */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n switch (event.key) {\n case 'ArrowDown':\n if (this.state().open()) {\n this.state().activateNextOption();\n } else {\n this.state().openDropdown();\n }\n event.preventDefault();\n break;\n case 'ArrowUp':\n if (this.state().open()) {\n this.state().activatePreviousOption();\n } else {\n this.state().openDropdown();\n this.state().activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Home':\n if (this.state().open()) {\n this.state().activeDescendantManager.first();\n }\n event.preventDefault();\n break;\n case 'End':\n if (this.state().open()) {\n this.state().activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Enter':\n if (this.state().open()) {\n const activeItem = this.state().activeDescendantManager.activeItem();\n if (activeItem) {\n this.state().toggleOption(activeItem);\n }\n }\n event.preventDefault();\n break;\n case 'Escape':\n this.state().closeDropdown();\n event.preventDefault();\n break;\n case 'Backspace':\n // if the input is not empty then open the dropdown\n if (this.elementRef.nativeElement.value.length > 0) {\n this.state().openDropdown();\n }\n break;\n default:\n // Ignore keys with length > 1 (e.g., 'Shift', 'ArrowLeft', 'Enter', etc.)\n // Filter out control/meta key combos (e.g., Ctrl+C)\n if (event.key.length > 1 || event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n\n // if this was a character key, we want to open the dropdown\n this.state().openDropdown();\n }\n }\n\n @HostListener('blur', ['$event'])\n protected closeDropdown(event: FocusEvent): void {\n const relatedTarget = event.relatedTarget as HTMLElement;\n\n // if the blur was caused by focus moving to the dropdown, don't close\n if (\n relatedTarget &&\n this.state().dropdown()?.elementRef.nativeElement.contains(relatedTarget)\n ) {\n return;\n }\n\n // if the blur was caused by focus moving to the button, don't close\n if (relatedTarget && this.state().button()?.elementRef.nativeElement.contains(relatedTarget)) {\n return;\n }\n\n this.state().closeDropdown();\n event.preventDefault();\n }\n\n /**\n * Focus the input field\n * @internal\n */\n focus(): void {\n this.elementRef.nativeElement.focus({ preventScroll: true });\n }\n\n @HostListener('focus', ['$event'])\n protected highlightText(): void {\n if (this.pointerFocused) {\n this.pointerFocused = false;\n return;\n }\n\n // highlight the text in the input\n this.elementRef.nativeElement.setSelectionRange(0, this.elementRef.nativeElement.value.length);\n }\n\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(): void {\n this.pointerFocused = true;\n }\n}\n","import type { NgpComboboxOption } from './combobox-option/combobox-option';\n\n/**\n * Check if all regular options (excluding 'all' and undefined) are selected.\n * @param options All available options\n * @param selectedValues Currently selected values\n * @param compareWith Comparison function\n * @returns true if all regular options are selected\n */\nexport function areAllOptionsSelected(\n options: NgpComboboxOption[],\n selectedValues: any[],\n compareWith: (a: any, b: any) => boolean,\n): boolean {\n const regularOptions = options.filter(opt => opt.value() !== 'all' && opt.value() !== undefined);\n return (\n regularOptions.length > 0 &&\n regularOptions.every(opt => selectedValues.some(val => compareWith(val, opt.value())))\n );\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n HostListener,\n input,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { NgpActivatable } from 'ng-primitives/a11y';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\nimport { areAllOptionsSelected } from '../utils';\n\n@Directive({\n selector: '[ngpComboboxOption]',\n exportAs: 'ngpComboboxOption',\n host: {\n role: 'option',\n '[id]': 'id()',\n '[attr.tabindex]': '-1',\n '[attr.aria-selected]': 'selected() ? \"true\" : undefined',\n '[attr.data-selected]': 'selected() ? \"\" : undefined',\n '[attr.data-active]': 'active() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '(click)': 'select()',\n },\n})\nexport class NgpComboboxOption implements OnInit, OnDestroy, NgpActivatable {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /**\n * The element reference of the option.\n * @internal\n */\n readonly elementRef = injectElementRef();\n\n /** The id of the option. */\n readonly id = input<string>(uniqueId('ngp-combobox-option'));\n\n /** @required The value of the option. */\n readonly value = input<any>(undefined, {\n alias: 'ngpComboboxOptionValue',\n });\n\n /** The disabled state of the option. */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxOptionDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Whether this option is the active descendant.\n * @internal\n */\n protected readonly active = computed(\n () => this.state().activeDescendantManager.activeDescendant() === this.id(),\n );\n\n /** Whether this option is selected. */\n protected readonly selected = computed(() => {\n const value = this.value();\n const stateValue = this.state().value();\n\n if (!value) {\n return false;\n }\n\n // Handle select all functionality - only works in multiple selection mode\n if (value === 'all') {\n if (!this.state().multiple()) {\n return false; // Never selected in single selection mode\n }\n\n const selectedValues = Array.isArray(stateValue) ? stateValue : [];\n return areAllOptionsSelected(\n this.state().options(),\n selectedValues,\n this.state().compareWith(),\n );\n }\n\n if (!stateValue) {\n return false;\n }\n\n if (this.state().multiple()) {\n return (\n Array.isArray(stateValue) && stateValue.some(v => this.state().compareWith()(value, v))\n );\n }\n\n return this.state().compareWith()(value, stateValue);\n });\n\n constructor() {\n this.state().registerOption(this);\n\n setupInteractions({\n hover: true,\n press: true,\n disabled: this.disabled,\n });\n }\n\n ngOnInit(): void {\n if (this.value() === undefined) {\n throw new Error(\n 'ngpComboboxOption: The value input is required. Please provide a value for the option.',\n );\n }\n }\n\n ngOnDestroy(): void {\n this.state().unregisterOption(this);\n }\n\n /**\n * Select the option.\n * @internal\n */\n select(): void {\n if (this.disabled()) {\n return;\n }\n\n this.state().toggleOption(this);\n }\n\n /**\n * Scroll the option into view.\n * @internal\n */\n scrollIntoView(): void {\n this.elementRef.nativeElement.scrollIntoView({ block: 'nearest' });\n }\n\n /**\n * Whenever the pointer enters the option, activate it.\n * @internal\n */\n @HostListener('pointerenter')\n protected onPointerEnter(): void {\n this.state().activeDescendantManager.activate(this);\n }\n\n /**\n * Whenever the pointer leaves the option, deactivate it.\n * @internal\n */\n @HostListener('pointerleave')\n protected onPointerLeave(): void {\n this.state().activeDescendantManager.activate(undefined);\n }\n}\n","import {\n Directive,\n inject,\n Injector,\n OnDestroy,\n signal,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { createOverlay, NgpOverlay, NgpOverlayConfig } from 'ng-primitives/portal';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxPortal]',\n exportAs: 'ngpComboboxPortal',\n})\nexport class NgpComboboxPortal implements OnDestroy {\n /** Access the combobox state. */\n private readonly state = injectComboboxState();\n /** Access the view container reference. */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /** Access the template reference. */\n private readonly templateRef = inject(TemplateRef);\n\n /** Access the injector. */\n private readonly injector = inject(Injector);\n\n /**\n * The overlay that manages the popover\n * @internal\n */\n readonly overlay = signal<NgpOverlay<void> | null>(null);\n\n constructor() {\n this.state().registerPortal(this);\n }\n\n /** Cleanup the portal. */\n ngOnDestroy(): void {\n this.overlay()?.destroy();\n }\n\n /**\n * Attach the portal.\n * @internal\n */\n show(): Promise<void> {\n // Create the overlay if it doesn't exist yet\n if (!this.overlay()) {\n this.createOverlay();\n }\n\n // Show the overlay\n return this.overlay()!.show();\n }\n\n /**\n * Detach the portal.\n * @internal\n */\n async detach(): Promise<void> {\n this.overlay()?.hide();\n }\n\n /**\n * Create the overlay that will contain the dropdown\n */\n private createOverlay(): void {\n // Create config for the overlay\n const config: NgpOverlayConfig<void> = {\n content: this.templateRef,\n viewContainerRef: this.viewContainerRef,\n triggerElement: this.state().elementRef.nativeElement,\n injector: this.injector,\n placement: this.state().placement(),\n closeOnOutsideClick: true,\n closeOnEscape: true,\n restoreFocus: false,\n scrollBehaviour: 'reposition',\n container: this.state().container(),\n };\n\n this.overlay.set(createOverlay(config));\n }\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\nimport { type NgpComboboxPlacement } from '../combobox/combobox';\n\nexport interface NgpComboboxConfig {\n /**\n * The default placement for the combobox dropdown.\n * @default 'bottom'\n */\n placement: NgpComboboxPlacement;\n\n /**\n * The container element or selector for the combobox dropdown.\n * This can be used to control where the dropdown is rendered in the DOM.\n * @default 'body'\n */\n container: HTMLElement | string | null;\n}\n\nexport const defaultComboboxConfig: NgpComboboxConfig = {\n placement: 'bottom',\n container: 'body',\n};\n\nexport const NgpComboboxConfigToken = new InjectionToken<NgpComboboxConfig>(\n 'NgpComboboxConfigToken',\n);\n\n/**\n * Provide the default Combobox configuration\n * @param config The Combobox configuration\n * @returns The provider\n */\nexport function provideComboboxConfig(config: Partial<NgpComboboxConfig>): Provider[] {\n return [\n {\n provide: NgpComboboxConfigToken,\n useValue: { ...defaultComboboxConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Combobox configuration\n * @returns The global Combobox configuration\n */\nexport function injectComboboxConfig(): NgpComboboxConfig {\n return inject(NgpComboboxConfigToken, { optional: true }) ?? defaultComboboxConfig;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n HostListener,\n inject,\n Injector,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { activeDescendantManager } from 'ng-primitives/a11y';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport type { NgpComboboxButton } from '../combobox-button/combobox-button';\nimport type { NgpComboboxDropdown } from '../combobox-dropdown/combobox-dropdown';\nimport type { NgpComboboxInput } from '../combobox-input/combobox-input';\nimport { NgpComboboxOption } from '../combobox-option/combobox-option';\nimport type { NgpComboboxPortal } from '../combobox-portal/combobox-portal';\nimport { injectComboboxConfig } from '../config/combobox-config';\nimport { areAllOptionsSelected } from '../utils';\nimport { comboboxState, provideComboboxState } from './combobox-state';\n\n/**\n * Ideally we would use a generic type here, unfortunately, unlike in React,\n * we cannot infer the type based on another input. For example, if multiple\n * is true, we cannot infer that the value is an array of T. Using a union\n * type is not ideal either because it requires the user to handle multiple cases.\n * Using a generic also isn't ideal because we need to use T as both an array and\n * a single value.\n *\n * Any seems to be used by Angular Material, ng-select, and other libraries\n * so we will use it here as well.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype T = any;\n\n@Directive({\n selector: '[ngpCombobox]',\n exportAs: 'ngpCombobox',\n providers: [provideComboboxState()],\n host: {\n '[attr.tabindex]': 'input() ? -1 : (state.disabled() ? -1 : 0)',\n '[attr.data-open]': 'state.open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state.multiple() ? \"\" : undefined',\n '[attr.data-invalid]': 'controlStatus()?.invalid ? \"\" : undefined',\n '[attr.data-valid]': 'controlStatus()?.valid ? \"\" : undefined',\n '[attr.data-touched]': 'controlStatus()?.touched ? \"\" : undefined',\n '[attr.data-pristine]': 'controlStatus()?.pristine ? \"\" : undefined',\n '[attr.data-dirty]': 'controlStatus()?.dirty ? \"\" : undefined',\n '[attr.data-pending]': 'controlStatus()?.pending ? \"\" : undefined',\n },\n})\nexport class NgpCombobox {\n /** Access the combobox configuration. */\n protected readonly config = injectComboboxConfig();\n\n /** @internal Access the combobox element. */\n readonly elementRef = injectElementRef();\n\n /** Access the injector. */\n protected readonly injector = inject(Injector);\n\n /** The value of the combobox. */\n readonly value = input<T>(undefined, {\n alias: 'ngpComboboxValue',\n });\n\n /** Event emitted when the value changes. */\n readonly valueChange = output<T>({\n alias: 'ngpComboboxValueChange',\n });\n\n /** Whether the combobox is multiple selection. */\n readonly multiple = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxMultiple',\n transform: booleanAttribute,\n });\n\n /** Whether the combobox is disabled. */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxDisabled',\n transform: booleanAttribute,\n });\n\n /** Whether the combobox allows deselection in single selection mode. */\n readonly allowDeselect = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxAllowDeselect',\n transform: booleanAttribute,\n });\n\n /** Emit when the dropdown open state changes. */\n readonly openChange = output<boolean>({\n alias: 'ngpComboboxOpenChange',\n });\n\n /** The comparator function used to compare options. */\n readonly compareWith = input<(a: T | undefined, b: T | undefined) => boolean>(Object.is, {\n alias: 'ngpComboboxCompareWith',\n });\n\n /** The position of the dropdown. */\n readonly placement = input<NgpComboboxPlacement>(this.config.placement, {\n alias: 'ngpComboboxDropdownPlacement',\n });\n\n /** The container for the dropdown. */\n readonly container = input<HTMLElement | string | null>(this.config.container, {\n alias: 'ngpComboboxDropdownContainer',\n });\n\n /**\n * Store the combobox input\n * @internal\n */\n readonly input = signal<NgpComboboxInput | undefined>(undefined);\n\n /**\n * Store the combobox button.\n * @internal\n */\n readonly button = signal<NgpComboboxButton | undefined>(undefined);\n\n /**\n * Store the combobox portal.\n * @internal\n */\n readonly portal = signal<NgpComboboxPortal | undefined>(undefined);\n\n /**\n * Store the combobox dropdown.\n * @internal\n */\n readonly dropdown = signal<NgpComboboxDropdown | undefined>(undefined);\n\n /**\n * Store the combobox options.\n * @internal\n */\n readonly options = signal<NgpComboboxOption[]>([]);\n\n /**\n * Access the overlay\n * @internal\n */\n readonly overlay = computed(() => this.portal()?.overlay());\n\n /**\n * The open state of the combobox.\n * @internal\n */\n readonly open = computed(() => this.overlay()?.isOpen() ?? false);\n\n /**\n * The active key descendant manager.\n * @internal\n */\n readonly activeDescendantManager = activeDescendantManager({\n // we must wrap the signal in a computed to ensure it is not used before it is defined\n disabled: computed(() => this.state.disabled()),\n items: this.options,\n });\n\n /** The control status */\n protected readonly controlStatus = computed(() => this.input()?.controlStatus());\n\n /** The state of the combobox. */\n protected readonly state = comboboxState<NgpCombobox>(this);\n\n constructor() {\n setupInteractions({\n focus: true,\n focusWithin: true,\n hover: true,\n press: true,\n disabled: this.state.disabled,\n });\n\n // any time the active descendant changes, ensure we scroll it into view\n // perform after next render to ensure the DOM is updated\n // e.g. the dropdown is open before the option is scrolled into view\n afterRenderEffect({\n write: () => {\n const isPositioned = this.portal()?.overlay()?.isPositioned() ?? false;\n const activeItem = this.activeDescendantManager.activeItem();\n\n if (!isPositioned || !activeItem) {\n return;\n }\n\n this.activeDescendantManager.activeItem()?.scrollIntoView?.();\n },\n });\n }\n\n /**\n * Open the dropdown.\n * @internal\n */\n async openDropdown(): Promise<void> {\n if (this.state.disabled() || this.open()) {\n return;\n }\n\n this.openChange.emit(true);\n await this.portal()?.show();\n\n // if there is a selected option(s), set the active descendant to the first selected option\n const selectedOption = this.options().find(option => this.isOptionSelected(option));\n\n // if there is no selected option, set the active descendant to the first option\n const targetOption = selectedOption ?? this.options()[0];\n\n // if there is no target option, do nothing\n if (!targetOption) {\n return;\n }\n\n // activate the selected option or the first option\n this.activeDescendantManager.activate(targetOption);\n }\n\n /**\n * Close the dropdown.\n * @internal\n */\n closeDropdown(): void {\n if (!this.open()) {\n return;\n }\n\n this.openChange.emit(false);\n this.portal()?.detach();\n\n // clear the active descendant\n this.activeDescendantManager.reset();\n }\n\n /**\n * Toggle the dropdown.\n * @internal\n */\n async toggleDropdown(): Promise<void> {\n if (this.open()) {\n this.closeDropdown();\n } else {\n await this.openDropdown();\n }\n }\n\n /**\n * Select an option.\n * @param option The option to select.\n * @internal\n */\n selectOption(option: NgpComboboxOption | undefined): void {\n if (this.state.disabled()) {\n return;\n }\n\n if (!option) {\n this.state.value.set(undefined);\n this.closeDropdown();\n return;\n }\n\n // Handle select all functionality - only works in multiple selection mode\n if (option.value() === 'all') {\n if (!this.state.multiple()) {\n return; // Do nothing in single selection mode\n }\n\n // Get currently visible regular options (respects filtering)\n const regularOptions = this.options().filter(\n opt => opt.value() !== 'all' && opt.value() !== undefined,\n );\n const allValues = regularOptions.map(opt => opt.value());\n\n this.state.value.set(allValues as T);\n this.valueChange.emit(allValues as T);\n return;\n }\n\n if (this.state.multiple()) {\n // if the option is already selected, do nothing\n if (this.isOptionSelected(option)) {\n return;\n }\n\n const value = [...(this.state.value() as T[]), option.value() as T];\n\n // add the option to the value\n this.state.value.set(value as T);\n this.valueChange.emit(value as T);\n } else {\n this.state.value.set(option.value() as T);\n this.valueChange.emit(option.value() as T);\n\n // close the dropdown on single selection\n this.closeDropdown();\n }\n }\n\n /**\n * Deselect an option.\n * @param option The option to deselect.\n * @internal\n */\n deselectOption(option: NgpComboboxOption): void {\n // if the combobox is disabled or the option is not selected, do nothing\n if (this.state.disabled() || !this.isOptionSelected(option)) {\n return;\n }\n\n // in single selection mode, only allow deselecting if allowDeselect is true\n if (!this.state.multiple() && !this.state.allowDeselect()) {\n return;\n }\n\n // Handle select all for deselect all functionality - only works in multiple selection mode\n if (option.value() === 'all') {\n if (!this.state.multiple()) {\n return; // Do nothing in single selection mode\n }\n\n this.state.value.set([] as T);\n this.valueChange.emit([] as T);\n return;\n }\n\n if (this.state.multiple()) {\n const values = (this.state.value() as T[]) ?? [];\n const newValue = values.filter(v => !this.state.compareWith()(v, option.value() as T));\n\n // remove the option from the value\n this.state.value.set(newValue as T);\n this.valueChange.emit(newValue as T);\n } else {\n // in single selection mode with allowDeselect enabled, set value to undefined\n this.state.value.set(undefined);\n this.valueChange.emit(undefined);\n }\n }\n\n /**\n * Toggle the selection of an option.\n * @param option The option to toggle.\n * @internal\n */\n toggleOption(option: NgpComboboxOption): void {\n if (this.state.disabled()) {\n return;\n }\n\n // Handle select all for select/deselect all functionality - only works in multiple selection mode\n if (option.value() === 'all') {\n if (!this.state.multiple()) {\n return; // Do nothing in single selection mode\n }\n\n if (this.isOptionSelected(option)) {\n this.deselectOption(option);\n } else {\n this.selectOption(option);\n }\n return;\n }\n\n if (this.state.multiple()) {\n // In multiple selection mode, always allow toggling\n if (this.isOptionSelected(option)) {\n this.deselectOption(option);\n } else {\n this.selectOption(option);\n }\n } else {\n // In single selection mode, check if deselection is allowed\n if (this.isOptionSelected(option) && this.state.allowDeselect()) {\n // Deselect the option by setting value to undefined\n this.state.value.set(undefined);\n this.valueChange.emit(undefined);\n } else {\n // Select the option (works even if already selected to update the input)\n this.selectOption(option);\n }\n }\n }\n\n /**\n * Determine if an option is selected.\n * @param option The option to check.\n * @internal\n */\n isOptionSelected(option: NgpComboboxOption): boolean {\n if (this.state.disabled()) {\n return false;\n }\n\n const optionValue = option.value();\n const value = this.state.value();\n\n // Handle select all functionality - only works in multiple selection mode\n if (optionValue === 'all') {\n if (!this.state.multiple()) {\n return false; // Never selected in single selection mode\n }\n\n const selectedValues = Array.isArray(value) ? value : [];\n return areAllOptionsSelected(this.options(), selectedValues, this.state.compareWith());\n }\n\n if (!value) {\n return false;\n }\n\n if (this.state.multiple()) {\n return value && (value as T[]).some(v => this.state.compareWith()(optionValue, v));\n }\n\n return this.state.compareWith()(optionValue, value);\n }\n\n /**\n * Activate the next option in the list if there is one.\n * If there is no option currently active, activate the selected option or the first option.\n * @internal\n */\n activateNextOption(): void {\n if (this.state.disabled()) {\n return;\n }\n\n const options = this.options();\n\n // if there are no options, do nothing\n if (options.length === 0) {\n return;\n }\n\n // if there is no active option, activate the first option\n if (!this.activeDescendantManager.activeItem()) {\n const selectedOption = options.find(option => this.isOptionSelected(option));\n\n // if there is a selected option(s), set the active descendant to the first selected option\n const targetOption = selectedOption ?? options[0];\n\n this.activeDescendantManager.activate(targetOption);\n return;\n }\n\n // otherwise activate the next option\n this.activeDescendantManager.next();\n }\n\n /**\n * Activate the previous option in the list if there is one.\n * @internal\n */\n activatePreviousOption(): void {\n if (this.state.disabled()) {\n return;\n }\n const options = this.options();\n // if there are no options, do nothing\n if (options.length === 0) {\n return;\n }\n // if there is no active option, activate the last option\n if (!this.activeDescendantManager.activeItem()) {\n const selectedOption = options.find(option => this.isOptionSelected(option));\n // if there is a selected option(s), set the active descendant to the first selected option\n const targetOption = selectedOption ?? options[options.length - 1];\n this.activeDescendantManager.activate(targetOption);\n return;\n }\n // otherwise activate the previous option\n this.activeDescendantManager.previous();\n }\n\n /**\n * Register the dropdown portal with the combobox.\n * @param portal The dropdown portal.\n * @internal\n */\n registerPortal(portal: NgpComboboxPortal): void {\n this.portal.set(portal);\n }\n\n /**\n * Register the combobox input with the combobox.\n * @param input The combobox input.\n * @internal\n */\n registerInput(input: NgpComboboxInput): void {\n this.input.set(input);\n }\n\n /**\n * Register the combobox button with the combobox.\n * @param button The combobox button.\n * @internal\n */\n registerButton(button: NgpComboboxButton): void {\n this.button.set(button);\n }\n\n /**\n * Register the dropdown with the combobox.\n * @param dropdown The dropdown to register.\n * @internal\n */\n registerDropdown(dropdown: NgpComboboxDropdown): void {\n this.dropdown.set(dropdown);\n }\n\n /**\n * Register an option with the combobox.\n * @param option The option to register.\n * @internal\n */\n registerOption(option: NgpComboboxOption): void {\n this.options.update(options => [...options, option]);\n }\n\n /**\n * Unregister an option from the combobox.\n * @param option The option to unregister.\n * @internal\n */\n unregisterOption(option: NgpComboboxOption): void {\n this.options.update(options => options.filter(o => o !== option));\n }\n\n /**\n * Focus the combobox.\n * When an input element is present, it will be focused.\n * Otherwise, the combobox element itself will be focused.\n * This enables keyboard navigation for comboboxes without input elements.\n * @internal\n */\n focus(): void {\n if (this.input()) {\n this.input()?.focus();\n } else {\n this.elementRef.nativeElement.focus();\n }\n }\n\n /**\n * Handle keydown events for keyboard navigation and accessibility.\n * Supports:\n * - Arrow Down: Open dropdown or navigate to next option\n * - Arrow Up: Open dropdown or navigate to previous option\n * - Home: Navigate to first option\n * - End: Navigate to last option\n * - Enter: Select the currently active option\n * - Escape: Close the dropdown\n * @param event - The keyboard event\n * @internal\n */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n // If the event originated from the input element, let the input handle it\n if (this.input() && event.target === this.input()?.elementRef.nativeElement) {\n return;\n }\n\n switch (event.key) {\n case 'ArrowDown':\n if (this.open()) {\n this.activateNextOption();\n } else {\n this.openDropdown();\n }\n event.preventDefault();\n break;\n case 'ArrowUp':\n if (this.open()) {\n this.activatePreviousOption();\n } else {\n this.openDropdown();\n // Use setTimeout to ensure dropdown is rendered before selecting last item\n setTimeout(() => this.activeDescendantManager.last());\n }\n event.preventDefault();\n break;\n case 'Home':\n if (this.open()) {\n this.activeDescendantManager.first();\n }\n event.preventDefault();\n break;\n case 'End':\n if (this.open()) {\n this.activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Enter':\n if (this.open()) {\n this.selectOption(this.activeDescendantManager.activeItem());\n }\n event.preventDefault();\n break;\n case 'Escape':\n if (this.open()) {\n this.closeDropdown();\n }\n event.preventDefault();\n break;\n }\n }\n\n /**\n * Handle blur events to manage dropdown closing behavior.\n * The dropdown will remain open if focus moves to:\n * - The dropdown itself\n * - The combobox button\n * - The combobox input\n * Otherwise, the dropdown will be closed.\n * @param event - The focus event\n * @internal\n */\n @HostListener('blur', ['$event'])\n protected onBlur(event: FocusEvent): void {\n const relatedTarget = event.relatedTarget as HTMLElement;\n\n // if the blur was caused by focus moving to the dropdown, don't close\n if (relatedTarget && this.dropdown()?.elementRef.nativeElement.contains(relatedTarget)) {\n return;\n }\n\n // if the blur was caused by focus moving to the button, don't close\n if (relatedTarget && this.button()?.elementRef.nativeElement.contains(relatedTarget)) {\n return;\n }\n\n // if the blur was caused by focus moving to the input, don't close\n if (relatedTarget && this.input()?.elementRef.nativeElement === relatedTarget) {\n return;\n }\n\n this.closeDropdown();\n }\n}\n\nexport type NgpComboboxPlacement =\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-start'\n | 'top-end'\n | 'right-start'\n | 'right-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'left-start'\n | 'left-end';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAQA;;AAEG;AACI,MAAM,qBAAqB,GAAG,gBAAgB,CAAc,UAAU,CAAC;AAE9E;;AAEG;MACU,oBAAoB,GAAG,mBAAmB,CAAC,qBAAqB;AAE7E;;AAEG;MACU,mBAAmB,GAAG,mBAAmB,CAAc,qBAAqB;AAEzF;;AAEG;AACI,MAAM,aAAa,GAAG,WAAW,CAAC,qBAAqB,CAAC;;MCJlD,iBAAiB,CAAA;AAgB5B,IAAA,WAAA,GAAA;;QAdmB,IAAA,CAAA,KAAK,GAAG,mBAAmB,EAAE;AAEh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