@mintplayer/ng-bootstrap 22.31.0 → 22.33.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/README.md +12 -11
- package/_bootstrap.scss +2 -4
- package/a11y/forms/package.json +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs +120 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +3 -273
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +72 -139
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +34 -60
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +24 -27
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +39 -17
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +26 -6
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +4 -8
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +169 -240
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +9 -8
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +6 -8
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -40
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +316 -211
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +26 -12
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +87 -676
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +52 -119
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +16 -24
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +9 -9
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +5 -7
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +201 -197
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +11 -19
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +64 -123
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +19 -29
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs +8 -4
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +54 -35
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +72 -99
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +23 -36
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +45 -28
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +214 -19
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +27 -12
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +61 -245
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +92 -0
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +31 -15
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +49 -77
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +53 -393
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +11 -9
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +29 -49
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +21 -12
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +12 -12
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +27 -49
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +29 -15
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +57 -253
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +60 -335
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +48 -57
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +11 -15
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +235 -168
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +86 -44
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +80 -137
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +29 -326
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +47 -63
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +16 -22
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +48 -171
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +12 -10
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +52 -108
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +9 -9
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +25 -11
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +37 -32
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +61 -99
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +31 -30
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +67 -306
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +7 -9
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +14 -15
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +109 -143
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +51 -154
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +11 -13
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +160 -232
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/nav/package.json +4 -0
- package/package.json +11 -28
- package/types/mintplayer-ng-bootstrap-a11y-forms.d.ts +64 -0
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +3 -142
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +51 -86
- package/types/mintplayer-ng-bootstrap-alert.d.ts +21 -28
- package/types/mintplayer-ng-bootstrap-badge.d.ts +13 -12
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +31 -8
- package/types/mintplayer-ng-bootstrap-button-group.d.ts +15 -4
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -5
- package/types/mintplayer-ng-bootstrap-card.d.ts +102 -76
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +24 -17
- package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-checkbox.d.ts +144 -92
- package/types/mintplayer-ng-bootstrap-close.d.ts +17 -5
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +42 -226
- package/types/mintplayer-ng-bootstrap-context-menu.d.ts +35 -17
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +23 -35
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +3 -7
- package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +3 -5
- package/types/mintplayer-ng-bootstrap-dock.d.ts +6 -8
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +122 -54
- package/types/mintplayer-ng-bootstrap-file-manager.d.ts +10 -20
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +62 -44
- package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +12 -15
- package/types/mintplayer-ng-bootstrap-for.d.ts +5 -5
- package/types/mintplayer-ng-bootstrap-form.d.ts +33 -11
- package/types/mintplayer-ng-bootstrap-grid.d.ts +42 -21
- package/types/mintplayer-ng-bootstrap-input-group.d.ts +11 -22
- package/types/mintplayer-ng-bootstrap-list-group.d.ts +31 -10
- package/types/mintplayer-ng-bootstrap-machine.d.ts +107 -5
- package/types/mintplayer-ng-bootstrap-marquee.d.ts +18 -5
- package/types/mintplayer-ng-bootstrap-modal.d.ts +43 -84
- package/types/mintplayer-ng-bootstrap-multi-range.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-nav.d.ts +52 -0
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +22 -6
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +27 -38
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +35 -112
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +5 -4
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +22 -34
- package/types/mintplayer-ng-bootstrap-parallax.d.ts +14 -4
- package/types/mintplayer-ng-bootstrap-phone-input.d.ts +6 -7
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +19 -18
- package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +22 -6
- package/types/mintplayer-ng-bootstrap-popover.d.ts +36 -59
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +80 -68
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +35 -18
- package/types/mintplayer-ng-bootstrap-query-builder.d.ts +12 -20
- package/types/mintplayer-ng-bootstrap-radio.d.ts +112 -84
- package/types/mintplayer-ng-bootstrap-range.d.ts +36 -13
- package/types/mintplayer-ng-bootstrap-rating.d.ts +33 -42
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +24 -114
- package/types/mintplayer-ng-bootstrap-ribbon.d.ts +21 -37
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +19 -27
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +26 -50
- package/types/mintplayer-ng-bootstrap-select.d.ts +9 -8
- package/types/mintplayer-ng-bootstrap-shell.d.ts +40 -63
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +5 -7
- package/types/mintplayer-ng-bootstrap-spinner.d.ts +14 -7
- package/types/mintplayer-ng-bootstrap-splitter.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +23 -13
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +61 -57
- package/types/mintplayer-ng-bootstrap-table.d.ts +23 -18
- package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +94 -154
- package/types/mintplayer-ng-bootstrap-timeline.d.ts +23 -25
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +4 -8
- package/types/mintplayer-ng-bootstrap-toast.d.ts +94 -55
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +34 -33
- package/types/mintplayer-ng-bootstrap-tree-select.d.ts +14 -16
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -13
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +109 -133
- package/calendar-month/package.json +0 -4
- package/container/package.json +0 -4
- package/dropdown-divider/package.json +0 -4
- package/dropdown-menu/package.json +0 -4
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +0 -136
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs +0 -18
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +0 -23
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +0 -161
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +0 -32
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +0 -31
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +0 -1
- package/has-overlay/package.json +0 -4
- package/no-noscript/package.json +0 -4
- package/types/mintplayer-ng-bootstrap-calendar-month.d.ts +0 -54
- package/types/mintplayer-ng-bootstrap-container.d.ts +0 -8
- package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +0 -8
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +0 -94
- package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +0 -22
- package/types/mintplayer-ng-bootstrap-no-noscript.d.ts +0 -11
|
@@ -1,283 +1,211 @@
|
|
|
1
|
-
import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject,
|
|
2
|
+
import { inject, Injector, DestroyRef, ElementRef, signal, PLATFORM_ID, afterNextRender, forwardRef, Directive, computed, TemplateRef, input, numberAttribute, booleanAttribute, model, output, contentChild, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { useHostAttrs, useCore, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
5
|
+
import { typeaheadCore, typeaheadScopedStyles } from '@mintplayer/ui-core/typeahead';
|
|
6
|
+
export { inMemoryTypeaheadProvider } from '@mintplayer/ui-core/typeahead';
|
|
7
|
+
import { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';
|
|
8
|
+
import { bootstrapDropdown } from '@mintplayer/ui-core/bootstrap/dropdown';
|
|
4
9
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
-
import { isObservable } from 'rxjs';
|
|
6
|
-
import { BsIdService, takeHostAria } from '@mintplayer/ng-bootstrap/a11y';
|
|
7
|
-
import { useScopedStyles, machineSignal, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
8
|
-
import { abortError } from '@mintplayer/ui-core/async';
|
|
9
10
|
import { preHydrationValue } from '@mintplayer/ui-core/forms';
|
|
10
|
-
import { trackOpenSide } from '@mintplayer/ui-core/overlay';
|
|
11
|
-
import { TYPEAHEAD_SCOPE, typeaheadScopedStyles, TypeaheadMachine, connect } from '@mintplayer/ui-core/typeahead';
|
|
12
|
-
export { inMemoryTypeaheadProvider } from '@mintplayer/ui-core/typeahead';
|
|
13
11
|
|
|
12
|
+
const INPUT = 'input[role=combobox]';
|
|
14
13
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
* The `ControlValueAccessor` of `bs-typeahead` (a host directive of the
|
|
15
|
+
* generated component, see `typeahead.angular.ts`). The value is the term. A
|
|
16
|
+
* bound form control drives it through `viewValue`; what the user types reaches
|
|
17
|
+
* the form through the component's `valuechange`, which a form write never
|
|
18
|
+
* echoes (a programmatic set does not query either).
|
|
19
|
+
*/
|
|
20
|
+
class BsTypeaheadValueAccessor {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.injector = inject(Injector);
|
|
23
|
+
this.destroyRef = inject(DestroyRef);
|
|
24
|
+
this.host = inject(ElementRef).nativeElement;
|
|
25
|
+
/** A form control drives the term: its `viewValue` wins over the `value` input. */
|
|
26
|
+
this.bound = signal(false, /* @ts-ignore */
|
|
27
|
+
...(ngDevMode ? [{ debugName: "bound" }] : /* istanbul ignore next */ []));
|
|
28
|
+
this.viewValue = signal('', /* @ts-ignore */
|
|
29
|
+
...(ngDevMode ? [{ debugName: "viewValue" }] : /* istanbul ignore next */ []));
|
|
30
|
+
this.disabled = signal(false, /* @ts-ignore */
|
|
31
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
32
|
+
this.onChange = () => undefined;
|
|
33
|
+
this.onTouched = () => undefined;
|
|
34
|
+
this.adoptPreHydrationText();
|
|
35
|
+
}
|
|
36
|
+
ngOnInit() {
|
|
37
|
+
// The component is created after its host directives, so it is looked up here.
|
|
38
|
+
const component = this.injector.get(BsTypeaheadComponent);
|
|
39
|
+
const sub = component.value.subscribe((value) => {
|
|
40
|
+
if (!this.bound() || value === this.viewValue())
|
|
41
|
+
return;
|
|
42
|
+
this.viewValue.set(value);
|
|
43
|
+
this.onChange(value);
|
|
44
|
+
});
|
|
45
|
+
this.destroyRef.onDestroy(() => sub.unsubscribe());
|
|
46
|
+
}
|
|
47
|
+
registerOnChange(fn) {
|
|
48
|
+
this.bound.set(true);
|
|
49
|
+
this.onChange = fn;
|
|
50
|
+
}
|
|
51
|
+
registerOnTouched(fn) {
|
|
52
|
+
this.onTouched = fn;
|
|
53
|
+
}
|
|
54
|
+
writeValue(value) {
|
|
55
|
+
this.viewValue.set(value ?? '');
|
|
56
|
+
}
|
|
57
|
+
setDisabledState(isDisabled) {
|
|
58
|
+
this.disabled.set(isDisabled);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Text typed into the server-rendered input before hydration would be
|
|
62
|
+
* overwritten by the `value` binding. Read it while the host still holds the
|
|
63
|
+
* server DOM, and replay it as typing once the form directives have written
|
|
64
|
+
* their initial value (ngModel writes in a microtask after the first render)
|
|
65
|
+
* and the core has attached: a real `input` event, so the term, the model,
|
|
66
|
+
* the form control and the query all take the path live typing takes.
|
|
67
|
+
*/
|
|
68
|
+
adoptPreHydrationText() {
|
|
69
|
+
if (!isPlatformBrowser(inject(PLATFORM_ID)))
|
|
70
|
+
return;
|
|
71
|
+
const server = this.host.querySelector(INPUT);
|
|
72
|
+
const typed = preHydrationValue(this.host, server?.getAttribute('value') ?? '', INPUT);
|
|
73
|
+
if (typed === null)
|
|
74
|
+
return;
|
|
75
|
+
afterNextRender(() => queueMicrotask(() => {
|
|
76
|
+
const input = this.host.querySelector(INPUT);
|
|
77
|
+
if (!input || input.value)
|
|
78
|
+
return; // the consumer or the user already wrote a term
|
|
79
|
+
input.value = typed;
|
|
80
|
+
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTypeaheadValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
84
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsTypeaheadValueAccessor, isStandalone: true, host: { listeners: { "focusout": "onTouched()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTypeaheadValueAccessor), multi: true }], ngImport: i0 }); }
|
|
85
|
+
}
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTypeaheadValueAccessor, decorators: [{
|
|
87
|
+
type: Directive,
|
|
88
|
+
args: [{
|
|
89
|
+
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTypeaheadValueAccessor), multi: true }],
|
|
90
|
+
host: {
|
|
91
|
+
'(focusout)': 'onTouched()',
|
|
92
|
+
},
|
|
93
|
+
}]
|
|
94
|
+
}], ctorParameters: () => [] });
|
|
95
|
+
|
|
96
|
+
/*
|
|
97
|
+
* The Angular extension of the generated `bs-typeahead` (PRD #437 D10 escape
|
|
98
|
+
* hatch): Angular forms. A bound form control drives the term and the
|
|
99
|
+
* disabled state. (An Observable provider needs nothing here: the core
|
|
100
|
+
* accepts any observable-like answer.)
|
|
28
101
|
*/
|
|
102
|
+
const hostDirectives = [BsTypeaheadValueAccessor];
|
|
103
|
+
function extendInputs(inputs) {
|
|
104
|
+
const accessor = inject(BsTypeaheadValueAccessor, { self: true });
|
|
105
|
+
return computed(() => {
|
|
106
|
+
const value = inputs();
|
|
107
|
+
return {
|
|
108
|
+
...value,
|
|
109
|
+
value: accessor.bound() ? accessor.viewValue() : value.value,
|
|
110
|
+
disabled: value.disabled || accessor.disabled(),
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// GENERATED from the typeahead manifest (typeahead) by @mintplayer/nx-component-compiler. Do not edit.
|
|
116
|
+
/** The `item` slot of `<bs-typeahead>`: `<ng-template bsTypeaheadItem>` or `*bsTypeaheadItem`. */
|
|
29
117
|
class BsTypeaheadItemDirective {
|
|
30
118
|
constructor() {
|
|
31
119
|
this.templateRef = inject(TemplateRef);
|
|
32
|
-
/** Type carrier only; never read at runtime. */
|
|
33
|
-
this.bsTypeaheadItemOf = input(undefined, /* @ts-ignore */
|
|
34
|
-
...(ngDevMode ? [{ debugName: "bsTypeaheadItemOf" }] : /* istanbul ignore next */ []));
|
|
35
120
|
}
|
|
36
121
|
static ngTemplateContextGuard(_dir, ctx) {
|
|
37
122
|
return true;
|
|
38
123
|
}
|
|
39
124
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTypeaheadItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
40
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
125
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsTypeaheadItemDirective, isStandalone: true, selector: "[bsTypeaheadItem]", ngImport: i0 }); }
|
|
41
126
|
}
|
|
42
127
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTypeaheadItemDirective, decorators: [{
|
|
43
128
|
type: Directive,
|
|
44
129
|
args: [{ selector: '[bsTypeaheadItem]' }]
|
|
45
|
-
}]
|
|
46
|
-
|
|
130
|
+
}] });
|
|
47
131
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* applies the core's ARIA bags with `[mpProps]`. Because it is an Angular
|
|
54
|
-
* template, Angular SSR emits a real, named `<input>` that submits free text
|
|
55
|
-
* with JavaScript disabled, and hydration attaches to that same node.
|
|
56
|
-
*
|
|
57
|
-
* Value = the term (string). `selectedItem()` holds the last picked item until
|
|
58
|
-
* the text changes. Usable with `[(value)]`, `[(ngModel)]`, `formControlName`.
|
|
132
|
+
* A text input with asynchronous suggestions and free text (#436). The value is the term; a
|
|
133
|
+
* pick writes its text into the input and emits `itemSelect`. The `provider` answers with a
|
|
134
|
+
* Promise or an Observable, and a newer term aborts the previous request. Server-rendered as a
|
|
135
|
+
* real, named `<input>` that submits free text with JavaScript off. Slot: `item` (a
|
|
136
|
+
* suggestion's content, with the `item` and the `term`). An `aria-label` names the input.
|
|
59
137
|
*/
|
|
60
138
|
class BsTypeaheadComponent {
|
|
139
|
+
#core;
|
|
61
140
|
constructor() {
|
|
62
|
-
/**
|
|
141
|
+
/** The host element. */
|
|
142
|
+
this.elementRef = inject(ElementRef);
|
|
143
|
+
/** The consumer's aria-*, id and tabindex on the host, for the role-bearing node. */
|
|
144
|
+
this.hostAttrs = useHostAttrs();
|
|
63
145
|
this.provider = input(null, /* @ts-ignore */
|
|
64
146
|
...(ngDevMode ? [{ debugName: "provider" }] : /* istanbul ignore next */ []));
|
|
65
|
-
|
|
66
|
-
this.
|
|
67
|
-
...(ngDevMode ?
|
|
68
|
-
|
|
69
|
-
this.minLength = input(1, /* @ts-ignore */
|
|
70
|
-
...(ngDevMode ? [{ debugName: "minLength" }] : /* istanbul ignore next */ []));
|
|
71
|
-
this.disabled = input(false, /* @ts-ignore */
|
|
72
|
-
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
73
|
-
/** The text a pick writes into the input. Default: `item.text`, else `String(item)`. */
|
|
74
|
-
this.itemText = input(undefined, /* @ts-ignore */
|
|
147
|
+
this.debounceMs = input(200, { ...(ngDevMode ? { debugName: "debounceMs" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
148
|
+
this.minLength = input(1, { ...(ngDevMode ? { debugName: "minLength" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
149
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
150
|
+
this.itemText = input(null, /* @ts-ignore */
|
|
75
151
|
...(ngDevMode ? [{ debugName: "itemText" }] : /* istanbul ignore next */ []));
|
|
76
|
-
|
|
77
|
-
this.itemKey = input(undefined, /* @ts-ignore */
|
|
152
|
+
this.itemKey = input(null, /* @ts-ignore */
|
|
78
153
|
...(ngDevMode ? [{ debugName: "itemKey" }] : /* istanbul ignore next */ []));
|
|
79
|
-
/** Submitted with a native `<form>` under this name (also with JavaScript disabled). */
|
|
80
154
|
this.name = input(null, /* @ts-ignore */
|
|
81
155
|
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
82
|
-
/** Accessible name of the input. A host `aria-label` or `aria-labelledby` wins. */
|
|
83
156
|
this.inputLabel = input(null, /* @ts-ignore */
|
|
84
157
|
...(ngDevMode ? [{ debugName: "inputLabel" }] : /* istanbul ignore next */ []));
|
|
85
|
-
this.loadingLabel = input(
|
|
158
|
+
this.loadingLabel = input(null, /* @ts-ignore */
|
|
86
159
|
...(ngDevMode ? [{ debugName: "loadingLabel" }] : /* istanbul ignore next */ []));
|
|
87
|
-
this.noResultsLabel = input(
|
|
160
|
+
this.noResultsLabel = input(null, /* @ts-ignore */
|
|
88
161
|
...(ngDevMode ? [{ debugName: "noResultsLabel" }] : /* istanbul ignore next */ []));
|
|
89
|
-
|
|
90
|
-
this.resultsLabel = input(undefined, /* @ts-ignore */
|
|
162
|
+
this.resultsLabel = input(null, /* @ts-ignore */
|
|
91
163
|
...(ngDevMode ? [{ debugName: "resultsLabel" }] : /* istanbul ignore next */ []));
|
|
92
|
-
/** A persistent validation message, wired to the input with aria-errormessage. */
|
|
93
164
|
this.errorText = input(null, /* @ts-ignore */
|
|
94
165
|
...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
95
|
-
/** The term. Two-way; also the ControlValueAccessor value. */
|
|
96
166
|
this.value = model('', /* @ts-ignore */
|
|
97
167
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
98
|
-
|
|
99
|
-
this.
|
|
100
|
-
|
|
101
|
-
this.
|
|
168
|
+
/** A suggestion was picked, with the text it wrote. */
|
|
169
|
+
this.itemSelect = output();
|
|
170
|
+
/** Enter with no suggestion highlighted. */
|
|
171
|
+
this.termSubmit = output();
|
|
172
|
+
/** The list opened (true) or closed (false). */
|
|
173
|
+
this.openChange = output();
|
|
174
|
+
/** A provider call started for this term. */
|
|
175
|
+
this.searchStart = output();
|
|
176
|
+
/** The provider rejected. */
|
|
102
177
|
this.loadError = output();
|
|
103
|
-
this.
|
|
104
|
-
...(ngDevMode ? [{ debugName: "
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
* `role` is NOT forwarded: the input's role is `combobox` by contract. Read
|
|
115
|
-
* once, in the constructor, so the server render carries them too.
|
|
116
|
-
*/
|
|
117
|
-
this.hostAria = takeHostAria(inject(ElementRef).nativeElement);
|
|
118
|
-
this.disabledByCva = signal(false, /* @ts-ignore */
|
|
119
|
-
...(ngDevMode ? [{ debugName: "disabledByCva" }] : /* istanbul ignore next */ []));
|
|
120
|
-
/** Set by afterNextRender (client only), so the readiness mark is never in server HTML. */
|
|
121
|
-
this.hydrated = signal(false, /* @ts-ignore */
|
|
122
|
-
...(ngDevMode ? [{ debugName: "hydrated" }] : /* istanbul ignore next */ []));
|
|
123
|
-
this.onChange = () => undefined;
|
|
124
|
-
this.onTouched = () => undefined;
|
|
125
|
-
this.trackItem = (index, item) => this.machine.itemKeyOf(item) ?? index;
|
|
126
|
-
const host = inject(ElementRef).nativeElement;
|
|
127
|
-
useScopedStyles(TYPEAHEAD_SCOPE, typeaheadScopedStyles);
|
|
128
|
-
this.machine = new TypeaheadMachine({
|
|
129
|
-
id: this.id,
|
|
130
|
-
value: this.value(),
|
|
131
|
-
onChange: (term) => {
|
|
132
|
-
this.value.set(term);
|
|
133
|
-
this.onChange(term);
|
|
134
|
-
},
|
|
135
|
-
onSelect: (item) => this.select.emit(item),
|
|
136
|
-
onSubmit: (term) => this.submitted.emit(term),
|
|
137
|
-
onOpen: () => this.opened.emit(),
|
|
138
|
-
onClose: () => {
|
|
139
|
-
this.closed.emit();
|
|
140
|
-
this.onTouched();
|
|
141
|
-
},
|
|
142
|
-
onError: (error) => this.loadError.emit(error),
|
|
143
|
-
});
|
|
144
|
-
this.state = machineSignal(this.machine);
|
|
145
|
-
this.api = computed(() => {
|
|
146
|
-
const api = connect(this.state(), this.id, { name: this.name(), hydrated: this.hydrated() });
|
|
147
|
-
// A host aria-label / aria-labelledby wins over inputLabel (naming conformance).
|
|
148
|
-
return { ...api, input: { ...api.input, ...this.hostAria } };
|
|
149
|
-
}, /* @ts-ignore */
|
|
150
|
-
...(ngDevMode ? [{ debugName: "api" }] : /* istanbul ignore next */ []));
|
|
151
|
-
this.selectedItem = computed(() => this.state().selectedItem, /* @ts-ignore */
|
|
152
|
-
...(ngDevMode ? [{ debugName: "selectedItem" }] : /* istanbul ignore next */ []));
|
|
153
|
-
inject(DestroyRef).onDestroy(() => this.machine.destroy());
|
|
154
|
-
// Inputs → machine configuration. Each effect reads one input so an
|
|
155
|
-
// unrelated input change does not re-apply everything.
|
|
156
|
-
effect(() => {
|
|
157
|
-
const provider = this.provider();
|
|
158
|
-
this.machine.provider = provider ? adaptProvider(provider) : null;
|
|
159
|
-
});
|
|
160
|
-
effect(() => (this.machine.debounceMs = this.debounceMs()));
|
|
161
|
-
effect(() => (this.machine.minLength = this.minLength()));
|
|
162
|
-
effect(() => (this.machine.itemText = this.itemText()));
|
|
163
|
-
effect(() => (this.machine.itemKey = this.itemKey()));
|
|
164
|
-
effect(() => this.machine.setDisabled(this.disabled() || this.disabledByCva()));
|
|
165
|
-
effect(() => this.machine.setErrorText(this.errorText()));
|
|
166
|
-
effect(() => {
|
|
167
|
-
const labels = { input: this.inputLabel() };
|
|
168
|
-
const loading = this.loadingLabel();
|
|
169
|
-
const noResults = this.noResultsLabel();
|
|
170
|
-
const results = this.resultsLabel();
|
|
171
|
-
if (loading !== undefined)
|
|
172
|
-
labels.loading = loading;
|
|
173
|
-
if (noResults !== undefined)
|
|
174
|
-
labels.noResults = noResults;
|
|
175
|
-
if (results !== undefined)
|
|
176
|
-
labels.results = results;
|
|
177
|
-
this.machine.setLabels(labels);
|
|
178
|
-
});
|
|
179
|
-
// A consumer write to [(value)] (not an echo of our own onChange) is a programmatic set: no query.
|
|
180
|
-
effect(() => {
|
|
181
|
-
const next = this.value();
|
|
182
|
-
if (next !== untracked(() => this.machine.snapshot.term))
|
|
183
|
-
this.machine.setValue(next);
|
|
184
|
-
});
|
|
185
|
-
this.adoptPreHydrationText(host);
|
|
186
|
-
// Browser only (afterNextRender never runs on the server): flip the list above the input near the viewport bottom.
|
|
187
|
-
const destroyRef = inject(DestroyRef);
|
|
188
|
-
afterNextRender(() => {
|
|
189
|
-
const untrack = trackOpenSide(this.machine, () => this.inputRef().nativeElement, () => this.listboxRef().nativeElement);
|
|
190
|
-
destroyRef.onDestroy(untrack);
|
|
191
|
-
this.hydrated.set(true);
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Text typed or pasted into the server-rendered input before hydration lives
|
|
196
|
-
* only in the DOM. Hydration's [value] binding would overwrite it with the
|
|
197
|
-
* empty term, and the replayed input event then reads the empty field, so it
|
|
198
|
-
* is lost. Read it here, while the host still holds the server DOM, and keep
|
|
199
|
-
* it as the term; once effects have configured the provider, re-enter it as a
|
|
200
|
-
* typed term so it notifies the model and queries.
|
|
201
|
-
*/
|
|
202
|
-
adoptPreHydrationText(host) {
|
|
203
|
-
if (!isPlatformBrowser(inject(PLATFORM_ID)))
|
|
204
|
-
return;
|
|
205
|
-
const typed = preHydrationValue(host, this.machine.snapshot.term, 'input');
|
|
206
|
-
if (typed === null)
|
|
207
|
-
return;
|
|
208
|
-
this.machine.setValue(typed);
|
|
209
|
-
this.value.set(typed);
|
|
210
|
-
afterNextRender(() => {
|
|
211
|
-
if (this.machine.snapshot.term !== typed)
|
|
212
|
-
return; // superseded by the consumer or the user
|
|
213
|
-
this.machine.setValue('');
|
|
214
|
-
this.machine.setTerm(typed);
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
// ---- template handlers --------------------------------------------------
|
|
218
|
-
onInput(event) {
|
|
219
|
-
this.machine.setTerm(event.target.value);
|
|
220
|
-
}
|
|
221
|
-
onKeydown(event) {
|
|
222
|
-
const handled = this.machine.keydown(event.key, event);
|
|
223
|
-
if (handled)
|
|
224
|
-
event.preventDefault();
|
|
225
|
-
}
|
|
226
|
-
onBlur() {
|
|
227
|
-
this.machine.blur();
|
|
228
|
-
this.onTouched();
|
|
178
|
+
this.itemSlot = contentChild(BsTypeaheadItemDirective, /* @ts-ignore */
|
|
179
|
+
...(ngDevMode ? [{ debugName: "itemSlot" }] : /* istanbul ignore next */ []));
|
|
180
|
+
/** The template's named slots. */
|
|
181
|
+
this.slots = computed(() => ({ item: this.itemSlot()?.templateRef }), /* @ts-ignore */
|
|
182
|
+
...(ngDevMode ? [{ debugName: "slots" }] : /* istanbul ignore next */ []));
|
|
183
|
+
this.#core = useCore(typeaheadCore, { inputs: extendInputs(() => ({ provider: this.provider(), debounceMs: this.debounceMs(), minLength: this.minLength(), disabled: this.disabled(), itemText: this.itemText(), itemKey: this.itemKey(), name: this.name(), inputLabel: this.inputLabel(), loadingLabel: this.loadingLabel(), noResultsLabel: this.noResultsLabel(), resultsLabel: this.resultsLabel(), errorText: this.errorText(), value: this.value() })), idPrefix: 'bs-typeahead', outputs: { itemSelect: this.itemSelect, termSubmit: this.termSubmit, openChange: this.openChange, searchStart: this.searchStart, loadError: this.loadError }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'typeahead' }), models: { value: this.value } });
|
|
184
|
+
/** The template's props. */
|
|
185
|
+
this.props = this.#core.props;
|
|
186
|
+
useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order });
|
|
187
|
+
useScopedStyles(bootstrapDropdown.key, bootstrapDropdown.css, { order: bootstrapDropdown.order });
|
|
188
|
+
useScopedStyles('typeahead', typeaheadScopedStyles);
|
|
229
189
|
}
|
|
230
190
|
/** Focus the input. */
|
|
231
|
-
focus() {
|
|
232
|
-
this.
|
|
233
|
-
}
|
|
234
|
-
// ---- ControlValueAccessor -----------------------------------------------
|
|
235
|
-
writeValue(value) {
|
|
236
|
-
this.value.set(value ?? '');
|
|
237
|
-
this.machine.setValue(value);
|
|
238
|
-
}
|
|
239
|
-
registerOnChange(fn) {
|
|
240
|
-
this.onChange = fn;
|
|
241
|
-
}
|
|
242
|
-
registerOnTouched(fn) {
|
|
243
|
-
this.onTouched = fn;
|
|
244
|
-
}
|
|
245
|
-
setDisabledState(isDisabled) {
|
|
246
|
-
this.disabledByCva.set(isDisabled);
|
|
191
|
+
focus(...args) {
|
|
192
|
+
return this.#core.call('focus', args);
|
|
247
193
|
}
|
|
248
194
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTypeaheadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
249
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTypeaheadComponent, isStandalone: true, selector: "bs-typeahead", inputs: { provider: { classPropertyName: "provider", publicName: "provider", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, itemText: { classPropertyName: "itemText", publicName: "itemText", isSignal: true, isRequired: false, transformFunction: null }, itemKey: { classPropertyName: "itemKey", publicName: "itemKey", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingLabel: { classPropertyName: "loadingLabel", publicName: "loadingLabel", isSignal: true, isRequired: false, transformFunction: null }, noResultsLabel: { classPropertyName: "noResultsLabel", publicName: "noResultsLabel", isSignal: true, isRequired: false, transformFunction: null }, resultsLabel: { classPropertyName: "resultsLabel", publicName: "resultsLabel", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange",
|
|
195
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTypeaheadComponent, isStandalone: true, selector: "bs-typeahead", inputs: { provider: { classPropertyName: "provider", publicName: "provider", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, itemText: { classPropertyName: "itemText", publicName: "itemText", isSignal: true, isRequired: false, transformFunction: null }, itemKey: { classPropertyName: "itemKey", publicName: "itemKey", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingLabel: { classPropertyName: "loadingLabel", publicName: "loadingLabel", isSignal: true, isRequired: false, transformFunction: null }, noResultsLabel: { classPropertyName: "noResultsLabel", publicName: "noResultsLabel", isSignal: true, isRequired: false, transformFunction: null }, resultsLabel: { classPropertyName: "resultsLabel", publicName: "resultsLabel", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", itemSelect: "itemSelect", termSubmit: "termSubmit", openChange: "openChange", searchStart: "searchStart", loadError: "loadError" }, queries: [{ propertyName: "itemSlot", first: true, predicate: BsTypeaheadItemDirective, descendants: true, isSignal: true }], hostDirectives: [{ directive: BsTypeaheadValueAccessor }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/typeahead/src/templates/typeahead.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"typeahead\" [mpProps]=\"p_view.input\" [value]=\"p_view.term\" [mpHostAttrs]=\"hostAttrs\">\n<ul data-mps=\"typeahead\" [mpProps]=\"p_view.listbox\">\n @if (p_view.status) {\n <li data-mps=\"typeahead\" [mpProps]=\"p_view.status.attrs\">\n {{ p_view.status.text }}\n </li>\n }\n @for (option of p_view.options; track option.key) {\n <li data-mps=\"typeahead\" [mpProps]=\"option.bag\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: option.item, item: option.item, term: p_view.term }\" />\n } @else {\n {{ option.text }}\n }\n </li>\n }\n</ul>\n<span data-mps=\"typeahead\" [mpProps]=\"p_view.live.attrs\">\n {{ p_view.live.text }}\n</span>\n@if (p_view.error) {\n <div data-mps=\"typeahead\" [mpProps]=\"p_view.error.attrs\">\n {{ p_view.error.text }}\n </div>\n}\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps],[mpHostAttrs]", inputs: ["mpProps", "mpHostAttrs"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
250
196
|
}
|
|
251
197
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTypeaheadComponent, decorators: [{
|
|
252
198
|
type: Component,
|
|
253
|
-
args: [{ selector: 'bs-typeahead', imports: [
|
|
254
|
-
}], ctorParameters: () => [], propDecorators: { provider: [{ type: i0.Input, args: [{ isSignal: true, alias: "provider", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], itemText: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemText", required: false }] }], itemKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemKey", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }], loadingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingLabel", required: false }] }], noResultsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsLabel", required: false }] }], resultsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "resultsLabel", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }],
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
if (!isObservable(result))
|
|
260
|
-
return result;
|
|
261
|
-
return new Promise((resolve, reject) => {
|
|
262
|
-
const subscription = result.subscribe({
|
|
263
|
-
next: (items) => {
|
|
264
|
-
resolve(items);
|
|
265
|
-
subscription.unsubscribe();
|
|
266
|
-
},
|
|
267
|
-
error: reject,
|
|
268
|
-
complete: () => resolve([]),
|
|
269
|
-
});
|
|
270
|
-
request.signal.addEventListener('abort', () => {
|
|
271
|
-
subscription.unsubscribe();
|
|
272
|
-
reject(abortError());
|
|
273
|
-
});
|
|
274
|
-
});
|
|
275
|
-
};
|
|
276
|
-
}
|
|
199
|
+
args: [{ selector: 'bs-typeahead', imports: [MpPropsDirective, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: hostDirectives, template: "<!-- GENERATED from libs/mintplayer-ui-core/typeahead/src/templates/typeahead.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"typeahead\" [mpProps]=\"p_view.input\" [value]=\"p_view.term\" [mpHostAttrs]=\"hostAttrs\">\n<ul data-mps=\"typeahead\" [mpProps]=\"p_view.listbox\">\n @if (p_view.status) {\n <li data-mps=\"typeahead\" [mpProps]=\"p_view.status.attrs\">\n {{ p_view.status.text }}\n </li>\n }\n @for (option of p_view.options; track option.key) {\n <li data-mps=\"typeahead\" [mpProps]=\"option.bag\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: option.item, item: option.item, term: p_view.term }\" />\n } @else {\n {{ option.text }}\n }\n </li>\n }\n</ul>\n<span data-mps=\"typeahead\" [mpProps]=\"p_view.live.attrs\">\n {{ p_view.live.text }}\n</span>\n@if (p_view.error) {\n <div data-mps=\"typeahead\" [mpProps]=\"p_view.error.attrs\">\n {{ p_view.error.text }}\n </div>\n}\n" }]
|
|
200
|
+
}], ctorParameters: () => [], propDecorators: { provider: [{ type: i0.Input, args: [{ isSignal: true, alias: "provider", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], itemText: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemText", required: false }] }], itemKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemKey", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }], loadingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingLabel", required: false }] }], noResultsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsLabel", required: false }] }], resultsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "resultsLabel", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], itemSelect: [{ type: i0.Output, args: ["itemSelect"] }], termSubmit: [{ type: i0.Output, args: ["termSubmit"] }], openChange: [{ type: i0.Output, args: ["openChange"] }], searchStart: [{ type: i0.Output, args: ["searchStart"] }], loadError: [{ type: i0.Output, args: ["loadError"] }], itemSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTypeaheadItemDirective), { isSignal: true }] }] } });
|
|
201
|
+
|
|
202
|
+
// GENERATED from the typeahead manifest by @mintplayer/nx-component-compiler. Do not edit.
|
|
203
|
+
|
|
204
|
+
// The typeahead is generated from @mintplayer/ui-core/typeahead (#458 M3).
|
|
277
205
|
|
|
278
206
|
/**
|
|
279
207
|
* Generated bundle index. Do not edit.
|
|
280
208
|
*/
|
|
281
209
|
|
|
282
|
-
export { BsTypeaheadComponent, BsTypeaheadItemDirective };
|
|
210
|
+
export { BsTypeaheadComponent, BsTypeaheadItemDirective, BsTypeaheadValueAccessor };
|
|
283
211
|
//# sourceMappingURL=mintplayer-ng-bootstrap-typeahead.mjs.map
|
|
@@ -1 +1 @@
|
|
|
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, takeHostAria } from '@mintplayer/ng-bootstrap/a11y';\nimport { machineSignal, MpPropsDirective, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { abortError } from '@mintplayer/ui-core/async';\nimport { preHydrationValue } from '@mintplayer/ui-core/forms';\nimport { trackOpenSide } from '@mintplayer/ui-core/overlay';\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 private readonly listboxRef = viewChild.required<ElementRef<HTMLUListElement>>('listbox');\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 /** Set by afterNextRender (client only), so the readiness mark is never in server HTML. */\n private readonly hydrated = 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(), hydrated: this.hydrated() });\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 // Browser only (afterNextRender never runs on the server): flip the list above the input near the viewport bottom.\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n const untrack = trackOpenSide(this.machine, () => this.inputRef().nativeElement, () => this.listboxRef().nativeElement);\n destroyRef.onDestroy(untrack);\n this.hydrated.set(true);\n });\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 = preHydrationValue(host, this.machine.snapshot.term, 'input');\n if (typed === null) 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/** 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 #listbox 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;AAHC,IAAA,OAAO,sBAAsB,CAAI,IAAiC,EAAE,GAAY,EAAA;AAC9E,QAAA,OAAO,IAAI;IACb;8GAPW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,UAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAA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../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.angular.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/generated/typeahead.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/generated/typeahead.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/mintplayer-ng-bootstrap-typeahead.ts"],"sourcesContent":["import { afterNextRender, DestroyRef, Directive, ElementRef, forwardRef, inject, Injector, OnInit, PLATFORM_ID, signal } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { preHydrationValue } from '@mintplayer/ui-core/forms';\nimport { BsTypeaheadComponent } from './generated';\n\nconst INPUT = 'input[role=combobox]';\n\n/**\n * The `ControlValueAccessor` of `bs-typeahead` (a host directive of the\n * generated component, see `typeahead.angular.ts`). The value is the term. A\n * bound form control drives it through `viewValue`; what the user types reaches\n * the form through the component's `valuechange`, which a form write never\n * echoes (a programmatic set does not query either).\n */\n@Directive({\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTypeaheadValueAccessor), multi: true }],\n host: {\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsTypeaheadValueAccessor implements ControlValueAccessor, OnInit {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** A form control drives the term: its `viewValue` wins over the `value` input. */\n readonly bound = signal(false);\n readonly viewValue = signal('');\n readonly disabled = signal(false);\n\n private onChange: (value: string) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n constructor() {\n this.adoptPreHydrationText();\n }\n\n ngOnInit(): void {\n // The component is created after its host directives, so it is looked up here.\n const component = this.injector.get(BsTypeaheadComponent);\n const sub = component.value.subscribe((value) => {\n if (!this.bound() || value === this.viewValue()) return;\n this.viewValue.set(value);\n this.onChange(value);\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n writeValue(value: string | null | undefined): void {\n this.viewValue.set(value ?? '');\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n /**\n * Text typed into the server-rendered input before hydration would be\n * overwritten by the `value` binding. Read it while the host still holds the\n * server DOM, and replay it as typing once the form directives have written\n * their initial value (ngModel writes in a microtask after the first render)\n * and the core has attached: a real `input` event, so the term, the model,\n * the form control and the query all take the path live typing takes.\n */\n private adoptPreHydrationText(): void {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n const server = this.host.querySelector<HTMLInputElement>(INPUT);\n const typed = preHydrationValue(this.host, server?.getAttribute('value') ?? '', INPUT);\n if (typed === null) return;\n afterNextRender(() =>\n queueMicrotask(() => {\n const input = this.host.querySelector<HTMLInputElement>(INPUT);\n if (!input || input.value) return; // the consumer or the user already wrote a term\n input.value = typed;\n input.dispatchEvent(new Event('input', { bubbles: true }));\n }),\n );\n }\n}\n","import { computed, inject } from '@angular/core';\nimport type { TypeaheadInputs } from '@mintplayer/ui-core/typeahead';\nimport { BsTypeaheadValueAccessor } from './typeahead.accessor';\n\n/*\n * The Angular extension of the generated `bs-typeahead` (PRD #437 D10 escape\n * hatch): Angular forms. A bound form control drives the term and the\n * disabled state. (An Observable provider needs nothing here: the core\n * accepts any observable-like answer.)\n */\n\nexport const hostDirectives = [BsTypeaheadValueAccessor];\n\nexport function extendInputs(inputs: () => TypeaheadInputs): () => TypeaheadInputs {\n const accessor = inject(BsTypeaheadValueAccessor, { self: true });\n return computed<TypeaheadInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n };\n });\n}\n","// GENERATED from the typeahead manifest (typeahead) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, Directive, ElementRef, TemplateRef, booleanAttribute, computed, contentChild, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MpPropsDirective, useCore, useHostAttrs, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { typeaheadCore, type TypeaheadInputs, type TypeaheadItem, type TypeaheadItemSelectDetail, type TypeaheadMethods, typeaheadScopedStyles } from '@mintplayer/ui-core/typeahead';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { bootstrapDropdown } from '@mintplayer/ui-core/bootstrap/dropdown';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../typeahead.angular';\n\n/** The `item` slot of `<bs-typeahead>`: `<ng-template bsTypeaheadItem>` or `*bsTypeaheadItem`. */\n@Directive({ selector: '[bsTypeaheadItem]' })\nexport class BsTypeaheadItemDirective {\n readonly templateRef = inject<TemplateRef<{ item: TypeaheadItem; term: string } & { $implicit: { item: TypeaheadItem; term: string }['item'] }>>(TemplateRef);\n static ngTemplateContextGuard(_dir: BsTypeaheadItemDirective, ctx: unknown): ctx is { item: TypeaheadItem; term: string } & { $implicit: { item: TypeaheadItem; term: string }['item'] } {\n return true;\n }\n}\n\n/**\n * A text input with asynchronous suggestions and free text (#436). The value is the term; a\n * pick writes its text into the input and emits `itemSelect`. The `provider` answers with a\n * Promise or an Observable, and a newer term aborts the previous request. Server-rendered as a\n * real, named `<input>` that submits free text with JavaScript off. Slot: `item` (a\n * suggestion's content, with the `item` and the `term`). An `aria-label` names the input.\n */\n@Component({\n selector: 'bs-typeahead',\n templateUrl: './typeahead.view.generated.html',\n imports: [MpPropsDirective, NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsTypeaheadComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The consumer's aria-*, id and tabindex on the host, for the role-bearing node. */\n protected readonly hostAttrs = useHostAttrs();\n\n readonly provider = input<TypeaheadInputs['provider']>(null);\n readonly debounceMs = input<TypeaheadInputs['debounceMs'], unknown>(200, { transform: (v: unknown) => numberAttribute(v) as TypeaheadInputs['debounceMs'] });\n readonly minLength = input<TypeaheadInputs['minLength'], unknown>(1, { transform: (v: unknown) => numberAttribute(v) as TypeaheadInputs['minLength'] });\n readonly disabled = input<TypeaheadInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly itemText = input<TypeaheadInputs['itemText']>(null);\n readonly itemKey = input<TypeaheadInputs['itemKey']>(null);\n readonly name = input<TypeaheadInputs['name']>(null);\n readonly inputLabel = input<TypeaheadInputs['inputLabel']>(null);\n readonly loadingLabel = input<TypeaheadInputs['loadingLabel']>(null);\n readonly noResultsLabel = input<TypeaheadInputs['noResultsLabel']>(null);\n readonly resultsLabel = input<TypeaheadInputs['resultsLabel']>(null);\n readonly errorText = input<TypeaheadInputs['errorText']>(null);\n readonly value = model<TypeaheadInputs['value']>('');\n /** A suggestion was picked, with the text it wrote. */\n readonly itemSelect = output<TypeaheadItemSelectDetail>();\n /** Enter with no suggestion highlighted. */\n readonly termSubmit = output<string>();\n /** The list opened (true) or closed (false). */\n readonly openChange = output<boolean>();\n /** A provider call started for this term. */\n readonly searchStart = output<string>();\n /** The provider rejected. */\n readonly loadError = output<unknown>();\n\n private readonly itemSlot = contentChild(BsTypeaheadItemDirective);\n /** The template's named slots. */\n protected readonly slots = computed(() => ({ item: this.itemSlot()?.templateRef }));\n readonly #core = useCore(typeaheadCore, { inputs: ext_extendInputs(() => ({ provider: this.provider(), debounceMs: this.debounceMs(), minLength: this.minLength(), disabled: this.disabled(), itemText: this.itemText(), itemKey: this.itemKey(), name: this.name(), inputLabel: this.inputLabel(), loadingLabel: this.loadingLabel(), noResultsLabel: this.noResultsLabel(), resultsLabel: this.resultsLabel(), errorText: this.errorText(), value: this.value() })), idPrefix: 'bs-typeahead', outputs: { itemSelect: this.itemSelect, termSubmit: this.termSubmit, openChange: this.openChange, searchStart: this.searchStart, loadError: this.loadError }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'typeahead' }), models: { value: this.value } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order }); useScopedStyles(bootstrapDropdown.key, bootstrapDropdown.css, { order: bootstrapDropdown.order }); useScopedStyles('typeahead', typeaheadScopedStyles);\n }\n\n /** Focus the input. */\n focus(...args: Parameters<TypeaheadMethods['focus']>): ReturnType<TypeaheadMethods['focus']> {\n return this.#core.call('focus', args) as ReturnType<TypeaheadMethods['focus']>;\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/typeahead/src/templates/typeahead.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"typeahead\" [mpProps]=\"p_view.input\" [value]=\"p_view.term\" [mpHostAttrs]=\"hostAttrs\">\n<ul data-mps=\"typeahead\" [mpProps]=\"p_view.listbox\">\n @if (p_view.status) {\n <li data-mps=\"typeahead\" [mpProps]=\"p_view.status.attrs\">\n {{ p_view.status.text }}\n </li>\n }\n @for (option of p_view.options; track option.key) {\n <li data-mps=\"typeahead\" [mpProps]=\"option.bag\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: option.item, item: option.item, term: p_view.term }\" />\n } @else {\n {{ option.text }}\n }\n </li>\n }\n</ul>\n<span data-mps=\"typeahead\" [mpProps]=\"p_view.live.attrs\">\n {{ p_view.live.text }}\n</span>\n@if (p_view.error) {\n <div data-mps=\"typeahead\" [mpProps]=\"p_view.error.attrs\">\n {{ p_view.error.text }}\n </div>\n}\n","// GENERATED from the typeahead manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsTypeaheadComponent, BsTypeaheadItemDirective } from './typeahead.component.generated';\n","// The typeahead is generated from @mintplayer/ui-core/typeahead (#458 M3).\nexport * from './generated';\nexport * from './typeahead.accessor';\nexport { inMemoryTypeaheadProvider } from '@mintplayer/ui-core/typeahead';\nexport type {\n TypeaheadItem,\n TypeaheadItemSelectDetail,\n TypeaheadLabels,\n TypeaheadProvider,\n TypeaheadRequest,\n TypeaheadSource,\n TypeaheadSubscribable,\n} from '@mintplayer/ui-core/typeahead';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsTypeaheadValueAccessor","ext_hostDirectives"],"mappings":";;;;;;;;;;;AAMA,MAAM,KAAK,GAAG,sBAAsB;AAEpC;;;;;;AAMG;MAOU,wBAAwB,CAAA;AAanC,IAAA,WAAA,GAAA;AAZiB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;;QAGxE,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;QACrB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,EAAE;sFAAC;QACtB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAA4B,MAAM,SAAS;AAC3D,QAAA,IAAA,CAAA,SAAS,GAAe,MAAM,SAAS;QAGrC,IAAI,CAAC,qBAAqB,EAAE;IAC9B;IAEA,QAAQ,GAAA;;QAEN,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,oBAAoB,CAAC;QACzD,MAAM,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;YAC9C,IAAI,CAAC,IAAI,CAAC,KAAK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