@mintplayer/ng-bootstrap 22.25.0 → 22.27.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/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +27 -48
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +7 -19
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +6 -160
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +102 -0
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +316 -174
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +250 -103
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/machine/package.json +4 -0
- package/package.json +7 -2
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +23 -34
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +0 -1
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +7 -0
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +6 -18
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +2 -48
- package/types/mintplayer-ng-bootstrap-machine.d.ts +54 -0
- package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +157 -42
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +141 -32
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-typeahead.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.html","../../../../libs/mintplayer-ng-bootstrap/typeahead/mintplayer-ng-bootstrap-typeahead.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, inject, input, model, output, signal, viewChild } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { BsLiveAnnouncerService, BsRovingFocusDirective, BsRovingFocusItemDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsComboboxDirective, BsDropdownDirective, BsDropdownMenuDirective } from '@mintplayer/ng-bootstrap/dropdown';\nimport { BsDropdownMenuComponent, BsDropdownItemDirective } from '@mintplayer/ng-bootstrap/dropdown-menu';\nimport { BsFormComponent, BsFormControlDirective } from '@mintplayer/ng-bootstrap/form';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { BsProgressComponent } from '@mintplayer/ng-bootstrap/progress-bar';\n\n@Component({\n selector: 'bs-typeahead',\n templateUrl: './typeahead.component.html',\n styleUrls: ['./typeahead.component.scss'],\n imports: [\n FormsModule,\n BsFormComponent, BsFormControlDirective,\n BsDropdownDirective, BsDropdownMenuDirective, BsDropdownMenuComponent, BsDropdownItemDirective,\n BsComboboxDirective,\n BsRovingFocusDirective, BsRovingFocusItemDirective,\n BsProgressComponent, BsHasOverlayComponent,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTypeaheadComponent {\n private announcer = inject(BsLiveAnnouncerService);\n\n isOpen = model(false);\n\n /**\n * Accessible name for the text input. Optional — a consumer wrapping the\n * typeahead in bs-floating-label gets a real <label> association instead —\n * but without either the control is unnamed.\n */\n inputLabel = input<string | null>(null);\n\n suggestions = input<any[]>([]);\n isLoading = signal<boolean>(false);\n showNoSuggestions = computed(() => this.suggestions().length === 0);\n\n readonly textbox = viewChild.required<ElementRef<HTMLInputElement>>('textbox');\n // Optional on purpose: it lives in the dropdown menu, which renders only while open.\n readonly rovingFocus = viewChild(BsRovingFocusDirective);\n searchterm = model('');\n isLoadingText = input('Loading...');\n noSuggestionsText = input('No suggestions found');\n resultsAnnouncementSingular = input<string>('1 result found');\n resultsAnnouncementPlural = input<(count: number) => string>((count) => `${count} results found`);\n provideSuggestions = output<string>();\n suggestionSelected = output<any>();\n submitted = output<string>();\n\n private requestInFlight = false;\n\n constructor() {\n effect(() => {\n const suggestions = this.suggestions();\n if (suggestions) {\n this.isLoading.set(false);\n if (this.requestInFlight) {\n this.requestInFlight = false;\n this.announceResults(suggestions.length);\n }\n }\n });\n }\n\n private announceResults(count: number) {\n if (count === 0) {\n this.announcer.announce(this.noSuggestionsText());\n } else if (count === 1) {\n this.announcer.announce(this.resultsAnnouncementSingular());\n } else {\n this.announcer.announce(this.resultsAnnouncementPlural()(count));\n }\n }\n\n onProvideSuggestions(value: string) {\n this.searchterm.set(value);\n if (value === '') {\n this.isOpen.set(false);\n this.requestInFlight = false;\n } else {\n this.requestInFlight = true;\n this.isLoading.set(true);\n this.isOpen.set(true);\n this.provideSuggestions.emit(value);\n }\n }\n\n suggestionClicked(suggestion: any) {\n this.searchterm.set(suggestion.text);\n this.isOpen.set(false);\n this.suggestionSelected.emit(suggestion);\n }\n\n onActivate() {\n const rf = this.rovingFocus();\n if (!rf) return;\n const suggestion = this.suggestions()[rf.activeIndex()];\n if (suggestion) {\n this.suggestionClicked(suggestion);\n }\n }\n\n onCancel() {\n // dropdown was already closed by bsCombobox; no extra work needed\n }\n\n onSubmit(event?: Event) {\n // Suppress browser form-submit; we own the Enter semantics here.\n event?.preventDefault();\n this.isOpen.set(false);\n this.submitted.emit(this.searchterm());\n }\n\n public focus() {\n this.textbox().nativeElement.focus();\n }\n}\n","<bs-has-overlay></bs-has-overlay>\n<bs-form>\n <div bsDropdown #dd=\"bsDropdown\" popupRole=\"listbox\" [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [sameDropdownWidth]=\"true\">\n <input type=\"text\"\n #textbox\n [attr.aria-label]=\"inputLabel()\"\n [ngModel]=\"searchterm()\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n bsCombobox\n (activate)=\"onActivate()\"\n (cancel)=\"onCancel()\"\n (keydown.enter)=\"onSubmit($event)\"\n autocomplete=\"off\" />\n <!--\n `mode=\"activedescendant\"` drives the a11y `bsRovingFocus` primitive;\n `menuMode=\"listbox\"` drives the WC-backed `bs-dropdown-menu`. Both\n directives sit on this one element (so roving's `contentChildren` finds\n the option `<li>`s as direct children) — the menu's mode input is aliased\n to `menuMode` precisely so it doesn't clobber roving's `mode`. The menu\n also mirrors the trigger's generated id + popup role (the `aria-controls`\n target) via the exported `bsDropdown` reference.\n -->\n <bs-dropdown-menu *bsDropdownMenu bsRovingFocus mode=\"activedescendant\" menuMode=\"listbox\"\n [attr.id]=\"dd.menuId() || null\" [attr.role]=\"dd.popupRole()\">\n @if (isLoading()) {\n <bs-progress [height]=\"2\" [isIndeterminate]=\"true\"></bs-progress>\n <li bsDropdownItem [disabled]=\"true\">\n {{ isLoadingText() }}\n </li>\n }\n @if (!isLoading()) {\n @if (showNoSuggestions()) {\n <li bsDropdownItem [disabled]=\"true\">\n {{ noSuggestionsText() }}\n </li>\n }\n @for (suggestion of suggestions(); track suggestion) {\n <li bsDropdownItem bsRovingFocusItem (click)=\"suggestionClicked(suggestion)\">\n {{ suggestion.text }}\n </li>\n }\n }\n </bs-dropdown-menu>\n </div>\n</bs-form>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAuBa,oBAAoB,CAAA;AA8B/B,IAAA,WAAA,GAAA;AA7BQ,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,sBAAsB,CAAC;QAElD,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,KAAK;mFAAC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AA,EAAA,IAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzCzD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-typeahead.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/typeahead/src/directives/typeahead-item.directive.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.html","../../../../libs/mintplayer-ng-bootstrap/typeahead/mintplayer-ng-bootstrap-typeahead.ts"],"sourcesContent":["import { Directive, inject, input, TemplateRef } from '@angular/core';\n\n/** The context of a `*bsTypeaheadItem` template: the item and the current term (for highlighting). */\nexport interface BsTypeaheadItemContext<T = unknown> {\n $implicit: T;\n term: string;\n}\n\n/**\n * Renders one suggestion row. Declared inside `<bs-typeahead>`; absent, the\n * row shows the item's text (`itemText`).\n *\n * ```html\n * <bs-typeahead [provider]=\"streets\">\n * <ng-container *bsTypeaheadItem=\"let street; let term = term; of: streetList\">\n * {{ street.name }} <small>{{ street.municipality }}</small>\n * </ng-container>\n * </bs-typeahead>\n * ```\n *\n * `of:` is optional and only carries the item type into the template (like\n * `ngFor`'s `of`); pass any value of the item type or an array of it.\n */\n@Directive({ selector: '[bsTypeaheadItem]' })\nexport class BsTypeaheadItemDirective<T = unknown> {\n readonly templateRef = inject<TemplateRef<BsTypeaheadItemContext<T>>>(TemplateRef);\n /** Type carrier only; never read at runtime. */\n readonly bsTypeaheadItemOf = input<readonly T[] | T | null | undefined>(undefined);\n\n static ngTemplateContextGuard<T>(_dir: BsTypeaheadItemDirective<T>, ctx: unknown): ctx is BsTypeaheadItemContext<T> {\n return true;\n }\n}\n","import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n DestroyRef,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n output,\n PLATFORM_ID,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { isObservable, Observable } from 'rxjs';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { machineSignal, MpPropsDirective, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { abortError } from '@mintplayer/ui-core/async';\nimport {\n connect,\n TYPEAHEAD_SCOPE,\n TypeaheadLabels,\n TypeaheadMachine,\n TypeaheadProvider,\n TypeaheadRequest,\n typeaheadScopedStyles,\n} from '@mintplayer/ui-core/typeahead';\nimport { BsTypeaheadItemDirective } from './directives/typeahead-item.directive';\n\n/**\n * An Angular provider may answer with a Promise or an Observable. An\n * Observable is unsubscribed when `request.signal` aborts, which cancels an\n * `HttpClient` request in flight.\n */\nexport type BsTypeaheadProvider<T> = (term: string, request: TypeaheadRequest) => Promise<readonly T[]> | Observable<readonly T[]>;\n\n/**\n * Typeahead: a text input with asynchronous suggestions and free text.\n *\n * The first component built on the headless-core architecture (#436): all\n * behaviour lives in `TypeaheadMachine` (`@mintplayer/ui-core/typeahead`); this\n * component renders its own Angular template from the machine's snapshot and\n * applies the core's ARIA bags with `[mpProps]`. Because it is an Angular\n * template, Angular SSR emits a real, named `<input>` that submits free text\n * with JavaScript disabled, and hydration attaches to that same node.\n *\n * Value = the term (string). `selectedItem()` holds the last picked item until\n * the text changes. Usable with `[(value)]`, `[(ngModel)]`, `formControlName`.\n */\n@Component({\n selector: 'bs-typeahead',\n templateUrl: './typeahead.component.html',\n imports: [NgTemplateOutlet, MpPropsDirective],\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTypeaheadComponent), multi: true }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { role: 'presentation' },\n})\nexport class BsTypeaheadComponent<T = unknown> implements ControlValueAccessor {\n /** Supplies suggestions for a settled term; a newer term aborts the previous request. */\n readonly provider = input<BsTypeaheadProvider<T> | null>(null);\n /** Quiet time after the last keystroke, ms. 0 requests synchronously. */\n readonly debounceMs = input<number>(200);\n /** A trimmed term shorter than this closes the list without querying. */\n readonly minLength = input<number>(1);\n readonly disabled = input<boolean>(false);\n /** The text a pick writes into the input. Default: `item.text`, else `String(item)`. */\n readonly itemText = input<((item: T) => string) | undefined>(undefined);\n /** Row identity for keyed rendering. Default: `itemText`. */\n readonly itemKey = input<((item: T) => unknown) | undefined>(undefined);\n /** Submitted with a native `<form>` under this name (also with JavaScript disabled). */\n readonly name = input<string | null>(null);\n /** Accessible name of the input. A host `aria-label` or `aria-labelledby` wins. */\n readonly inputLabel = input<string | null>(null);\n readonly loadingLabel = input<string | undefined>(undefined);\n readonly noResultsLabel = input<string | undefined>(undefined);\n /** Spoken once per settled request, e.g. `n => n + ' resultaten'`. */\n readonly resultsLabel = input<((count: number) => string) | undefined>(undefined);\n /** A persistent validation message, wired to the input with aria-errormessage. */\n readonly errorText = input<string | null>(null);\n\n /** The term. Two-way; also the ControlValueAccessor value. */\n readonly value = model<string>('');\n\n readonly select = output<T>();\n readonly submitted = output<string>();\n readonly opened = output<void>();\n readonly closed = output<void>();\n readonly loadError = output<unknown>();\n\n readonly itemTemplate = contentChild<BsTypeaheadItemDirective<T>>(BsTypeaheadItemDirective);\n private readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('input');\n\n readonly id = inject(BsIdService).next('bs-typeahead');\n /**\n * Host transparency: a consumer's `aria-*`, `id` and `tabindex` on\n * `<bs-typeahead>` land on the role-bearing input (`id` and `tabindex` are\n * moved, so no duplicate id and no dead tab stop on the host). A consumer\n * `role` is NOT forwarded: the input's role is `combobox` by contract. Read\n * once, in the constructor, so the server render carries them too.\n */\n private readonly hostAria = takeHostAria(inject(ElementRef).nativeElement as HTMLElement);\n readonly machine: TypeaheadMachine<T>;\n readonly state;\n readonly api;\n /** The last picked item, `null` once the text changes after the pick. */\n readonly selectedItem;\n\n private readonly disabledByCva = signal(false);\n private onChange: (value: string) => void = () => undefined;\n private onTouched: () => void = () => undefined;\n\n constructor() {\n const host = inject(ElementRef).nativeElement as HTMLElement;\n useScopedStyles(TYPEAHEAD_SCOPE, typeaheadScopedStyles);\n this.machine = new TypeaheadMachine<T>({\n id: this.id,\n value: this.value(),\n onChange: (term) => {\n this.value.set(term);\n this.onChange(term);\n },\n onSelect: (item) => this.select.emit(item),\n onSubmit: (term) => this.submitted.emit(term),\n onOpen: () => this.opened.emit(),\n onClose: () => {\n this.closed.emit();\n this.onTouched();\n },\n onError: (error) => this.loadError.emit(error),\n });\n this.state = machineSignal(this.machine);\n this.api = computed(() => {\n const api = connect(this.state(), this.id, { name: this.name() });\n // A host aria-label / aria-labelledby wins over inputLabel (naming conformance).\n return { ...api, input: { ...api.input, ...this.hostAria } };\n });\n this.selectedItem = computed(() => this.state().selectedItem);\n inject(DestroyRef).onDestroy(() => this.machine.destroy());\n\n // Inputs → machine configuration. Each effect reads one input so an\n // unrelated input change does not re-apply everything.\n effect(() => {\n const provider = this.provider();\n this.machine.provider = provider ? adaptProvider(provider) : null;\n });\n effect(() => (this.machine.debounceMs = this.debounceMs()));\n effect(() => (this.machine.minLength = this.minLength()));\n effect(() => (this.machine.itemText = this.itemText()));\n effect(() => (this.machine.itemKey = this.itemKey()));\n effect(() => this.machine.setDisabled(this.disabled() || this.disabledByCva()));\n effect(() => this.machine.setErrorText(this.errorText()));\n effect(() => {\n const labels: Partial<TypeaheadLabels> = { input: this.inputLabel() };\n const loading = this.loadingLabel();\n const noResults = this.noResultsLabel();\n const results = this.resultsLabel();\n if (loading !== undefined) labels.loading = loading;\n if (noResults !== undefined) labels.noResults = noResults;\n if (results !== undefined) labels.results = results;\n this.machine.setLabels(labels);\n });\n // A consumer write to [(value)] (not an echo of our own onChange) is a programmatic set: no query.\n effect(() => {\n const next = this.value();\n if (next !== untracked(() => this.machine.snapshot.term)) this.machine.setValue(next);\n });\n\n this.adoptPreHydrationText(host);\n }\n\n /**\n * Text typed or pasted into the server-rendered input before hydration lives\n * only in the DOM. Hydration's [value] binding would overwrite it with the\n * empty term, and the replayed input event then reads the empty field, so it\n * is lost. Read it here, while the host still holds the server DOM, and keep\n * it as the term; once effects have configured the provider, re-enter it as a\n * typed term so it notifies the model and queries.\n */\n private adoptPreHydrationText(host: HTMLElement): void {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n const typed = host.querySelector('input')?.value ?? '';\n if (!typed || typed === this.machine.snapshot.term) return;\n this.machine.setValue(typed);\n this.value.set(typed);\n afterNextRender(() => {\n if (this.machine.snapshot.term !== typed) return; // superseded by the consumer or the user\n this.machine.setValue('');\n this.machine.setTerm(typed);\n });\n }\n\n // ---- template handlers --------------------------------------------------\n\n protected onInput(event: Event): void {\n this.machine.setTerm((event.target as HTMLInputElement).value);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const handled = this.machine.keydown(event.key, event);\n if (handled) event.preventDefault();\n }\n\n protected onBlur(): void {\n this.machine.blur();\n this.onTouched();\n }\n\n protected trackItem = (index: number, item: T): unknown => this.machine.itemKeyOf(item) ?? index;\n\n /** Focus the input. */\n focus(): void {\n this.inputRef().nativeElement.focus();\n }\n\n // ---- ControlValueAccessor -----------------------------------------------\n\n writeValue(value: string | null): void {\n this.value.set(value ?? '');\n this.machine.setValue(value);\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabledByCva.set(isDisabled);\n }\n}\n\n/** Collect `aria-*` (copied) and `id` / `tabindex` (moved) from the host element. */\nfunction takeHostAria(host: HTMLElement): Record<string, string> {\n const bag = Object.fromEntries(\n Array.from(host.attributes)\n .filter(({ name }) => name.startsWith('aria-') || name === 'id' || name === 'tabindex')\n .map(({ name, value }) => [name, value]),\n );\n ['id', 'tabindex'].filter((name) => name in bag).forEach((name) => host.removeAttribute(name));\n return bag;\n}\n\n/** Promise or Observable in, Promise out; the Observable is unsubscribed when the request aborts. */\nfunction adaptProvider<T>(provider: BsTypeaheadProvider<T>): TypeaheadProvider<T> {\n return (term, request) => {\n const result = provider(term, request);\n if (!isObservable(result)) return result;\n return new Promise<readonly T[]>((resolve, reject) => {\n const subscription = result.subscribe({\n next: (items) => {\n resolve(items);\n subscription.unsubscribe();\n },\n error: reject,\n complete: () => resolve([]),\n });\n request.signal.addEventListener('abort', () => {\n subscription.unsubscribe();\n reject(abortError());\n });\n });\n };\n}\n","<div class=\"mp-typeahead\" [mpProps]=\"api().root\">\n <input #input\n class=\"form-control\"\n type=\"text\"\n [mpProps]=\"api().input\"\n [value]=\"state().term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\" />\n <ul class=\"dropdown-menu\" [mpProps]=\"api().listbox\">\n @if (api().status; as status) {\n <li class=\"ta-status\" [mpProps]=\"status.attrs\">{{ status.text }}</li>\n }\n @for (item of state().items; track trackItem($index, item); let i = $index) {\n <li class=\"dropdown-item\" [mpProps]=\"api().option(i)\" (mousedown)=\"$event.preventDefault()\" (click)=\"machine.pick(i)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate()?.templateRef ?? defaultItem; context: { $implicit: item, term: state().term }\"></ng-container>\n </li>\n }\n </ul>\n <span class=\"visually-hidden\" [mpProps]=\"api().live.attrs\">{{ api().live.text }}</span>\n @if (api().error; as error) {\n <div class=\"ta-error\" [mpProps]=\"error.attrs\">{{ error.text }}</div>\n }\n</div>\n<ng-template #defaultItem let-item>{{ machine.itemTextOf(item) }}</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAQA;;;;;;;;;;;;;;AAcG;MAEU,wBAAwB,CAAA;AADrC,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAyC,WAAW,CAAC;;QAEzE,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAsC,SAAS;8FAAC;AAKnF,IAAA;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CAAC,YAAY,CAAC,MAAM,CAAC;AAAE,YAAA,OAAO,MAAM;QACxC,OAAO,IAAI,OAAO,CAAe,CAAC,OAAO,EAAE,MAAM,KAAI;AACnD,YAAA,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC;AACpC,gBAAA,IAAI,EAAE,CAAC,KAAK,KAAI;oBACd,OAAO,CAAC,KAAK,CAAC;oBACd,YAAY,CAAC,WAAW,EAAE;gBAC5B,CAAC;AACD,gBAAA,KAAK,EAAE,MAAM;AACb,gBAAA,QAAQ,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC5B,aAAA,CAAC;YACF,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;gBAC5C,YAAY,CAAC,WAAW,EAAE;AAC1B,gBAAA,MAAM,CAAC,UAAU,EAAE,CAAC;AACtB,YAAA,CAAC,CAAC;AACJ,QAAA,CAAC,CAAC;AACJ,IAAA,CAAC;AACH;;AEhRA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/ng-bootstrap",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "22.
|
|
4
|
+
"version": "22.27.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -201,6 +201,10 @@
|
|
|
201
201
|
"types": "./types/mintplayer-ng-bootstrap-list-group.d.ts",
|
|
202
202
|
"default": "./fesm2022/mintplayer-ng-bootstrap-list-group.mjs"
|
|
203
203
|
},
|
|
204
|
+
"./machine": {
|
|
205
|
+
"types": "./types/mintplayer-ng-bootstrap-machine.d.ts",
|
|
206
|
+
"default": "./fesm2022/mintplayer-ng-bootstrap-machine.mjs"
|
|
207
|
+
},
|
|
204
208
|
"./markdown": {
|
|
205
209
|
"types": "./types/mintplayer-ng-bootstrap-markdown.d.ts",
|
|
206
210
|
"default": "./fesm2022/mintplayer-ng-bootstrap-markdown.mjs"
|
|
@@ -411,6 +415,7 @@
|
|
|
411
415
|
}
|
|
412
416
|
},
|
|
413
417
|
"peerDependencies": {
|
|
418
|
+
"@mintplayer/ui-core": "^1.1.0",
|
|
414
419
|
"@angular/common": "^22.0.0",
|
|
415
420
|
"@angular/core": "^22.0.0",
|
|
416
421
|
"@angular/cdk": "^22.0.0",
|
|
@@ -424,7 +429,7 @@
|
|
|
424
429
|
"@mintplayer/ng-animations": "^22.0.0",
|
|
425
430
|
"@mintplayer/pagination": "^2.3.0",
|
|
426
431
|
"@mintplayer/ng-focus-on-load": "^22.0.0",
|
|
427
|
-
"@mintplayer/web-components": "^
|
|
432
|
+
"@mintplayer/web-components": "^3.0.0",
|
|
428
433
|
"lit": "^3.3.0"
|
|
429
434
|
},
|
|
430
435
|
"dependencies": {
|
|
@@ -106,14 +106,11 @@ declare class BsForwardAriaDirective implements OnInit {
|
|
|
106
106
|
/**
|
|
107
107
|
* One marker per focusable child of a `bsRovingFocus` container.
|
|
108
108
|
*
|
|
109
|
-
* -
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* ring never paints.
|
|
115
|
-
* - Auto-generates an `id` if the host doesn't already have one, so combobox
|
|
116
|
-
* `aria-activedescendant` always has a stable target. Honours an
|
|
109
|
+
* - Sets the host `tabindex` (0 if active, -1 otherwise).
|
|
110
|
+
* - Toggles the `.bs-rovingfocus-active` class so SCSS can paint a highlight
|
|
111
|
+
* on the active item.
|
|
112
|
+
* - Auto-generates an `id` if the host doesn't already have one, so other
|
|
113
|
+
* ARIA references always have a stable target. Honours an
|
|
117
114
|
* externally-supplied id when present.
|
|
118
115
|
*
|
|
119
116
|
* Consumers normally don't interact with this directive directly — they
|
|
@@ -127,13 +124,11 @@ declare class BsRovingFocusItemDirective {
|
|
|
127
124
|
/**
|
|
128
125
|
* The host element's id. Honoured if set externally (e.g. by a sibling
|
|
129
126
|
* component's [attr.id] host binding); otherwise generated in afterNextRender
|
|
130
|
-
* so
|
|
127
|
+
* so an ARIA reference to the item has a stable target.
|
|
131
128
|
*
|
|
132
|
-
* Backed by a signal so
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* computation and never re-read — leading to aria-activedescendant="" on
|
|
136
|
-
* combobox inputs even after the items got real ids.
|
|
129
|
+
* Backed by a signal so a consumer computed that reads it re-runs when the id
|
|
130
|
+
* is resolved post-mount. A plain `nativeElement.id` getter would be silently
|
|
131
|
+
* cached during the first computation and never re-read.
|
|
137
132
|
*/
|
|
138
133
|
private readonly _itemId;
|
|
139
134
|
get itemId(): string;
|
|
@@ -147,33 +142,27 @@ declare class BsRovingFocusItemDirective {
|
|
|
147
142
|
}
|
|
148
143
|
|
|
149
144
|
type BsRovingFocusOrientation = 'vertical' | 'horizontal' | 'both';
|
|
150
|
-
type BsRovingFocusMode = 'tabindex' | 'activedescendant';
|
|
151
145
|
/**
|
|
152
|
-
* APG roving-tabindex
|
|
146
|
+
* APG roving-tabindex container.
|
|
153
147
|
*
|
|
154
|
-
* Place on a list/menu/
|
|
148
|
+
* Place on a list/menu/tablist; mark each focusable child with
|
|
155
149
|
* `bsRovingFocusItem`. Arrow keys, Home, and End move the active item; the
|
|
156
|
-
* directive auto-handles disabled items, wrap-around, and orientation.
|
|
150
|
+
* directive auto-handles disabled items, wrap-around, and orientation. Only
|
|
151
|
+
* the active item has `tabindex="0"`; real DOM focus moves.
|
|
157
152
|
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
* - **`activedescendant`** — items keep `tabindex="-1"`; DOM focus stays on
|
|
162
|
-
* an external owner (e.g. a combobox `<input>`) which mirrors the active
|
|
163
|
-
* item's id via `aria-activedescendant`. Right for comboboxes/listboxes
|
|
164
|
-
* where the user is also typing.
|
|
153
|
+
* The former `activedescendant` mode (focus parked on a combobox input) was
|
|
154
|
+
* removed with the typeahead's move to its headless core (#436 D10): the
|
|
155
|
+
* typeahead core owns that keyboard model, and nothing else used the mode.
|
|
165
156
|
*
|
|
166
157
|
* Consumers that need to react to the active item externally read
|
|
167
|
-
* `activeIndex()` (signal)
|
|
158
|
+
* `activeIndex()` (signal).
|
|
168
159
|
*/
|
|
169
160
|
declare class BsRovingFocusDirective {
|
|
170
161
|
private elementRef;
|
|
171
162
|
readonly orientation: i0.InputSignal<BsRovingFocusOrientation>;
|
|
172
|
-
readonly mode: i0.InputSignal<BsRovingFocusMode>;
|
|
173
163
|
readonly wrap: i0.InputSignal<boolean>;
|
|
174
164
|
readonly items: i0.Signal<readonly BsRovingFocusItemDirective[]>;
|
|
175
165
|
readonly activeIndex: i0.WritableSignal<number>;
|
|
176
|
-
readonly activeDescendantId: i0.Signal<string | null>;
|
|
177
166
|
focusFirst(): void;
|
|
178
167
|
focusLast(): void;
|
|
179
168
|
next(): void;
|
|
@@ -185,18 +174,18 @@ declare class BsRovingFocusDirective {
|
|
|
185
174
|
* @mintplayer/web-components/a11y — this directive and the WC RovingFocus
|
|
186
175
|
* controller had independently identical copies that had ALREADY drifted
|
|
187
176
|
* (wrap-vs-clamp default). One implementation, two adapters. The directive
|
|
188
|
-
* keeps its own signals
|
|
189
|
-
*
|
|
177
|
+
* keeps its own signals and discovery: those are Angular/light-DOM concerns
|
|
178
|
+
* the WC controller rightly lacks.
|
|
190
179
|
*
|
|
191
|
-
* Public so consumers
|
|
192
|
-
*
|
|
180
|
+
* Public so consumers can detect edges without re-implementing the
|
|
181
|
+
* disabled-aware scan.
|
|
193
182
|
*/
|
|
194
183
|
firstEnabledIndex(): number;
|
|
195
184
|
lastEnabledIndex(): number;
|
|
196
185
|
private step;
|
|
197
186
|
private moveTo;
|
|
198
187
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsRovingFocusDirective, never>;
|
|
199
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BsRovingFocusDirective, "[bsRovingFocus]", ["bsRovingFocus"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "
|
|
188
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BsRovingFocusDirective, "[bsRovingFocus]", ["bsRovingFocus"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, {}, ["items"], never, true, never>;
|
|
200
189
|
}
|
|
201
190
|
|
|
202
191
|
type BsOverlayInitialFocus = HTMLElement | 'first' | 'self' | 'none';
|
|
@@ -345,4 +334,4 @@ declare class BsControlValidityDirective implements DoCheck {
|
|
|
345
334
|
}
|
|
346
335
|
|
|
347
336
|
export { BsControlValidityDirective, BsForwardAriaDirective, BsIdService, BsLiveAnnouncerService, BsOverlayFocusDirective, BsOverlayStackService, BsRovingFocusDirective, BsRovingFocusItemDirective };
|
|
348
|
-
export type { BsOverlayInitialFocus,
|
|
337
|
+
export type { BsOverlayInitialFocus, BsRovingFocusOrientation };
|
|
@@ -42,7 +42,6 @@ declare class BsCodeSnippetComponent implements AfterViewInit {
|
|
|
42
42
|
*
|
|
43
43
|
* Angular's `output()` emits synchronously inside the DOM listener, so a
|
|
44
44
|
* `preventDefault()` in the handler lands before `dispatchEvent` returns.
|
|
45
|
-
* Same shape as `BsComboboxDirective`'s `activate`/`cancel`.
|
|
46
45
|
*/
|
|
47
46
|
readonly lineActivate: _angular_core.OutputEmitterRef<CustomEvent<{
|
|
48
47
|
line: number;
|
|
@@ -30,6 +30,13 @@ declare class DatatableSettings {
|
|
|
30
30
|
*/
|
|
31
31
|
interface BsDatatableFetchRequest extends PaginationRequest {
|
|
32
32
|
parentId?: unknown;
|
|
33
|
+
/**
|
|
34
|
+
* Aborts when the table invalidates its pages (sort, page size, a new
|
|
35
|
+
* `[fetch]`, `reload()`), so a superseded request stops instead of running to
|
|
36
|
+
* completion and being ignored. Hand it to `fetch`; for an `HttpClient`
|
|
37
|
+
* observable, unsubscribe on `signal.addEventListener('abort', …)`.
|
|
38
|
+
*/
|
|
39
|
+
signal: AbortSignal;
|
|
33
40
|
}
|
|
34
41
|
type BsDatatableFetch<T> = (req: BsDatatableFetchRequest) => Promise<PaginationResponse<T>>;
|
|
35
42
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { DropdownSelectEventDetail } from '@mintplayer/web-components/dropdown-menu';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* `<bs-dropdown-menu>` — Angular wrapper around the `<mp-dropdown-menu>` web
|
|
7
7
|
* component. This is the single dropdown-menu implementation: it is used
|
|
8
8
|
* standalone (projected through `*bsDropdownMenu` by the `[bsDropdown]` trigger
|
|
9
|
-
* stack)
|
|
10
|
-
*
|
|
9
|
+
* stack) and inside `<bs-navbar>`. Menu only: the typeahead renders its own
|
|
10
|
+
* listbox from its headless core (#436).
|
|
11
11
|
*
|
|
12
12
|
* Keyboard navigation, roving tabindex, the ARIA roles and the theme-aware
|
|
13
13
|
* styling all live in the WC (single source of UI truth). This wrapper bridges
|
|
@@ -19,20 +19,9 @@ import { DropdownMode, DropdownSelectEventDetail } from '@mintplayer/web-compone
|
|
|
19
19
|
* Declarative Shadow DOM (see `injectMpDropdownDsd`), so it renders with JS off.
|
|
20
20
|
*
|
|
21
21
|
* This wrapper stays framework-agnostic of the `[bsDropdown]` trigger stack (it
|
|
22
|
-
* lives in a sibling entry point).
|
|
23
|
-
* the consumer sets `mode="listbox"` and mirrors the trigger's `menuId`/
|
|
24
|
-
* `popupRole` onto this host (`[attr.id]`/`[attr.role]`) via the exported
|
|
25
|
-
* `bsDropdown` reference — the same directive the toggle and combobox read.
|
|
22
|
+
* lives in a sibling entry point).
|
|
26
23
|
*/
|
|
27
24
|
declare class BsDropdownMenuComponent {
|
|
28
|
-
/**
|
|
29
|
-
* `menu` (default, roving-tabindex nav) | `listbox` (consumer manages focus).
|
|
30
|
-
*
|
|
31
|
-
* Aliased to `menuMode` so it never collides with the `mode` input of the
|
|
32
|
-
* a11y `bsRovingFocus` directive when a combobox/listbox stacks both on this
|
|
33
|
-
* one element (same reason `bsCombobox` aliases its `autocomplete`).
|
|
34
|
-
*/
|
|
35
|
-
readonly mode: i0.InputSignal<DropdownMode>;
|
|
36
25
|
/** Pixel cap on the menu height; scrolls beyond. */
|
|
37
26
|
readonly maxHeight: i0.InputSignal<number | undefined>;
|
|
38
27
|
/** Id of an external label, set as `aria-labelledby` on the WC's list. */
|
|
@@ -43,7 +32,7 @@ declare class BsDropdownMenuComponent {
|
|
|
43
32
|
protected onSelect(event: Event): void;
|
|
44
33
|
constructor();
|
|
45
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsDropdownMenuComponent, never>;
|
|
46
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BsDropdownMenuComponent, "bs-dropdown-menu", never, { "
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BsDropdownMenuComponent, "bs-dropdown-menu", never, { "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; }, { "select": "select"; }, never, ["*"], true, never>;
|
|
47
36
|
}
|
|
48
37
|
|
|
49
38
|
/**
|
|
@@ -70,8 +59,7 @@ declare const BS_DROPDOWN_MENU_CONTEXT: InjectionToken<boolean>;
|
|
|
70
59
|
* Usage: `<li bsDropdownItem><a routerLink="/x">Action</a></li>`.
|
|
71
60
|
*
|
|
72
61
|
* Inputs:
|
|
73
|
-
* - `active` — Bootstrap `.active` appearance
|
|
74
|
-
* a `listbox` menu).
|
|
62
|
+
* - `active` — Bootstrap `.active` appearance.
|
|
75
63
|
* - `disabled` — non-interactive; removed from the menu's roving order.
|
|
76
64
|
* - `value` — opaque value carried in the menu's `select` event detail;
|
|
77
65
|
* written to the host `<li>` as its `dropdownValue` property, which the WC
|
|
@@ -42,7 +42,6 @@ declare class BsDropdownToggleDirective {
|
|
|
42
42
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsDropdownToggleDirective, "[bsDropdownToggle]", never, {}, {}, never, never, true, never>;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
type BsDropdownPopupRole = 'menu' | 'listbox';
|
|
46
45
|
declare class BsDropdownDirective {
|
|
47
46
|
elementRef: ElementRef<HTMLElement>;
|
|
48
47
|
private bsDevelopment;
|
|
@@ -55,58 +54,13 @@ declare class BsDropdownDirective {
|
|
|
55
54
|
closeOnClickOutside: _angular_core.InputSignal<boolean>;
|
|
56
55
|
sameDropdownWidth: _angular_core.InputSignal<boolean>;
|
|
57
56
|
isOpen: _angular_core.ModelSignal<boolean>;
|
|
58
|
-
readonly popupRole: _angular_core.InputSignal<BsDropdownPopupRole>;
|
|
59
57
|
/** Reactive id used for the menu's host id and for the toggle's aria-controls. Empty until afterNextRender resolves the host's static id (or generates one), so sibling host bindings on the wrapper element get a chance to land first. */
|
|
60
58
|
private _menuId;
|
|
61
59
|
readonly menuId: _angular_core.Signal<string>;
|
|
62
60
|
constructor();
|
|
63
61
|
onBlur(): void;
|
|
64
62
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsDropdownDirective, never>;
|
|
65
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsDropdownDirective, "[bsDropdown]", ["bsDropdown"], { "hasBackdrop": { "alias": "hasBackdrop"; "required": false; "isSignal": true; }; "sameWidth": { "alias": "sameWidth"; "required": false; "isSignal": true; }; "closeOnClickOutside": { "alias": "closeOnClickOutside"; "required": false; "isSignal": true; }; "sameDropdownWidth": { "alias": "sameDropdownWidth"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; };
|
|
63
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsDropdownDirective, "[bsDropdown]", ["bsDropdown"], { "hasBackdrop": { "alias": "hasBackdrop"; "required": false; "isSignal": true; }; "sameWidth": { "alias": "sameWidth"; "required": false; "isSignal": true; }; "closeOnClickOutside": { "alias": "closeOnClickOutside"; "required": false; "isSignal": true; }; "sameDropdownWidth": { "alias": "sameDropdownWidth"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; }, { "isOpen": "isOpenChange"; }, ["menu", "toggle", "rovingFocus"], never, true, never>;
|
|
66
64
|
}
|
|
67
65
|
|
|
68
|
-
|
|
69
|
-
type BsComboboxNavigateDirection = 'next' | 'prev' | 'first' | 'last';
|
|
70
|
-
/**
|
|
71
|
-
* APG Combobox pattern — turns a plain `<input>` into a combobox that drives
|
|
72
|
-
* an adjacent `bsDropdown` popup (typeahead, tree-select, etc.).
|
|
73
|
-
*
|
|
74
|
-
* The directive owns the input-side ARIA wiring:
|
|
75
|
-
* - `role="combobox"` on the host
|
|
76
|
-
* - `aria-expanded` / `aria-controls` derived from the parent dropdown
|
|
77
|
-
* - `aria-activedescendant` mirroring the dropdown's `bsRovingFocus` active id
|
|
78
|
-
* - `aria-autocomplete` (defaults to `"list"`)
|
|
79
|
-
*
|
|
80
|
-
* Keyboard model:
|
|
81
|
-
* - **ArrowUp/Down/Home/End** — opens the popup if closed; once open,
|
|
82
|
-
* forwards to the dropdown's `bsRovingFocus` (or emits a `navigate` event
|
|
83
|
-
* if no roving-focus is found, so consumers can manage navigation manually).
|
|
84
|
-
* - **Enter** — fires `activate` so the consumer can commit the highlighted
|
|
85
|
-
* option. `stopImmediatePropagation` is called to keep sibling
|
|
86
|
-
* `(keydown.enter)` listeners on the same input (e.g. "submit free-text
|
|
87
|
-
* search") from also firing on the same Enter.
|
|
88
|
-
* - **Escape** — closes the popup and fires `cancel`.
|
|
89
|
-
* - **Tab** — hybrid behaviour: while the popup is open and a roving-focus
|
|
90
|
-
* is present, Tab advances the active descendant; at the boundary, Tab
|
|
91
|
-
* closes the popup and falls through to the browser's default tab order.
|
|
92
|
-
*/
|
|
93
|
-
declare class BsComboboxDirective {
|
|
94
|
-
private dropdown;
|
|
95
|
-
/** Aliased to bsComboboxAutocomplete to avoid colliding with the host input's native HTML autocomplete attribute. */
|
|
96
|
-
readonly autocomplete: _angular_core.InputSignal<BsComboboxAutocomplete>;
|
|
97
|
-
/** Override the auto-derived activeDescendant. Defaults to dropdown.rovingFocus()'s id when present. */
|
|
98
|
-
readonly activeDescendant: _angular_core.InputSignal<string | null>;
|
|
99
|
-
readonly expanded: _angular_core.Signal<boolean>;
|
|
100
|
-
readonly controls: _angular_core.Signal<string | null>;
|
|
101
|
-
readonly resolvedActiveDescendant: _angular_core.Signal<string | null>;
|
|
102
|
-
/** Fires only when no BsRovingFocus is found inside the parent dropdown — otherwise arrow keys are forwarded automatically. */
|
|
103
|
-
readonly navigate: _angular_core.OutputEmitterRef<BsComboboxNavigateDirection>;
|
|
104
|
-
readonly activate: _angular_core.OutputEmitterRef<KeyboardEvent>;
|
|
105
|
-
readonly cancel: _angular_core.OutputEmitterRef<KeyboardEvent>;
|
|
106
|
-
onKeydown(event: KeyboardEvent): void;
|
|
107
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsComboboxDirective, never>;
|
|
108
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsComboboxDirective, "input[bsCombobox]", ["bsCombobox"], { "autocomplete": { "alias": "bsComboboxAutocomplete"; "required": false; "isSignal": true; }; "activeDescendant": { "alias": "activeDescendant"; "required": false; "isSignal": true; }; }, { "navigate": "navigate"; "activate": "activate"; "cancel": "cancel"; }, never, never, true, never>;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export { BsComboboxDirective, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownToggleDirective };
|
|
112
|
-
export type { BsComboboxAutocomplete, BsComboboxNavigateDirection, BsDropdownPopupRole };
|
|
66
|
+
export { BsDropdownDirective, BsDropdownMenuDirective, BsDropdownToggleDirective };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { DestroyRef, Signal } from '@angular/core';
|
|
3
|
+
import { Store } from '@mintplayer/ui-core/store';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Bridge a `@mintplayer/ui-core` store into Angular's reactivity: a read-only
|
|
7
|
+
* `Signal` of the store's snapshot, kept current by `subscribe` and released on
|
|
8
|
+
* the injection context's `DestroyRef`.
|
|
9
|
+
*
|
|
10
|
+
* The signal is set synchronously from the store's notification; Angular
|
|
11
|
+
* coalesces the resulting change detection, so a command that commits one
|
|
12
|
+
* snapshot costs one render (measured in `machine-signal.spec.ts`, spike S1).
|
|
13
|
+
*/
|
|
14
|
+
declare function machineSignal<S extends object>(store: Store<S>, destroyRef?: DestroyRef): Signal<S>;
|
|
15
|
+
|
|
16
|
+
/** An attribute bag as a core's `connect()` returns it. `null`/`undefined`/`false` remove the attribute; `true` sets it empty. */
|
|
17
|
+
type PropBag = Record<string, string | number | boolean | null | undefined>;
|
|
18
|
+
/**
|
|
19
|
+
* Apply a core's attribute bag to the host element — the Angular stand-in for
|
|
20
|
+
* JSX/Lit/Vue attribute spread. The directive diffs the previous and next bag:
|
|
21
|
+
* a key that disappears is *removed* from the DOM (a stale
|
|
22
|
+
* `aria-activedescendant` would otherwise survive a close), and unchanged keys
|
|
23
|
+
* are not rewritten.
|
|
24
|
+
*
|
|
25
|
+
* Attributes are written through `Renderer2`, so they land in the server-
|
|
26
|
+
* rendered HTML and are re-applied identically after hydration (spike S2 in
|
|
27
|
+
* docs/prd/typeahead-wc-436.md). Consumers never see a bag: the front's own
|
|
28
|
+
* template binds `[mpProps]="api().input"` on its own nodes.
|
|
29
|
+
*/
|
|
30
|
+
declare class MpPropsDirective {
|
|
31
|
+
readonly mpProps: i0.InputSignal<PropBag | null | undefined>;
|
|
32
|
+
private readonly element;
|
|
33
|
+
private readonly renderer;
|
|
34
|
+
private applied;
|
|
35
|
+
constructor();
|
|
36
|
+
private apply;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MpPropsDirective, never>;
|
|
38
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MpPropsDirective, "[mpProps]", never, { "mpProps": { "alias": "mpProps"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Install a core's scoped stylesheet from an Angular front. In the browser it
|
|
43
|
+
* goes through the shared registry (`installLightStyles`: once per key,
|
|
44
|
+
* cross-bundle safe). On the server the registry cannot run, so the marker
|
|
45
|
+
* `<style data-mp-light-styles="<key>">` is written straight into the
|
|
46
|
+
* request's `DOCUMENT` head — the client registry then treats it as already
|
|
47
|
+
* installed. No string post-processing of the response is involved.
|
|
48
|
+
*
|
|
49
|
+
* Call from the component's constructor (an injection context).
|
|
50
|
+
*/
|
|
51
|
+
declare function useScopedStyles(key: string, cssText: string): void;
|
|
52
|
+
|
|
53
|
+
export { MpPropsDirective, machineSignal, useScopedStyles };
|
|
54
|
+
export type { PropBag };
|