@mintplayer/ng-bootstrap 22.25.0 → 22.26.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-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-typeahead.d.ts +141 -32
|
@@ -1,130 +1,277 @@
|
|
|
1
|
+
import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject,
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { BsProgressComponent } from '@mintplayer/ng-bootstrap/progress-bar';
|
|
3
|
+
import { inject, TemplateRef, input, Directive, model, output, contentChild, viewChild, ElementRef, signal, computed, DestroyRef, effect, untracked, PLATFORM_ID, afterNextRender, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
+
import { isObservable } from 'rxjs';
|
|
6
|
+
import { BsIdService } from '@mintplayer/ng-bootstrap/a11y';
|
|
7
|
+
import { useScopedStyles, machineSignal, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
8
|
+
import { abortError } from '@mintplayer/ui-core/async';
|
|
9
|
+
import { TYPEAHEAD_SCOPE, typeaheadScopedStyles, TypeaheadMachine, connect } from '@mintplayer/ui-core/typeahead';
|
|
10
|
+
export { inMemoryTypeaheadProvider } from '@mintplayer/ui-core/typeahead';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Renders one suggestion row. Declared inside `<bs-typeahead>`; absent, the
|
|
14
|
+
* row shows the item's text (`itemText`).
|
|
15
|
+
*
|
|
16
|
+
* ```html
|
|
17
|
+
* <bs-typeahead [provider]="streets">
|
|
18
|
+
* <ng-container *bsTypeaheadItem="let street; let term = term; of: streetList">
|
|
19
|
+
* {{ street.name }} <small>{{ street.municipality }}</small>
|
|
20
|
+
* </ng-container>
|
|
21
|
+
* </bs-typeahead>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* `of:` is optional and only carries the item type into the template (like
|
|
25
|
+
* `ngFor`'s `of`); pass any value of the item type or an array of it.
|
|
26
|
+
*/
|
|
27
|
+
class BsTypeaheadItemDirective {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.templateRef = inject(TemplateRef);
|
|
30
|
+
/** Type carrier only; never read at runtime. */
|
|
31
|
+
this.bsTypeaheadItemOf = input(undefined, /* @ts-ignore */
|
|
32
|
+
...(ngDevMode ? [{ debugName: "bsTypeaheadItemOf" }] : /* istanbul ignore next */ []));
|
|
33
|
+
}
|
|
34
|
+
static ngTemplateContextGuard(_dir, ctx) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTypeaheadItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
38
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: BsTypeaheadItemDirective, isStandalone: true, selector: "[bsTypeaheadItem]", inputs: { bsTypeaheadItemOf: { classPropertyName: "bsTypeaheadItemOf", publicName: "bsTypeaheadItemOf", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTypeaheadItemDirective, decorators: [{
|
|
41
|
+
type: Directive,
|
|
42
|
+
args: [{ selector: '[bsTypeaheadItem]' }]
|
|
43
|
+
}], propDecorators: { bsTypeaheadItemOf: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsTypeaheadItemOf", required: false }] }] } });
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Typeahead: a text input with asynchronous suggestions and free text.
|
|
47
|
+
*
|
|
48
|
+
* The first component built on the headless-core architecture (#436): all
|
|
49
|
+
* behaviour lives in `TypeaheadMachine` (`@mintplayer/ui-core/typeahead`); this
|
|
50
|
+
* component renders its own Angular template from the machine's snapshot and
|
|
51
|
+
* applies the core's ARIA bags with `[mpProps]`. Because it is an Angular
|
|
52
|
+
* template, Angular SSR emits a real, named `<input>` that submits free text
|
|
53
|
+
* with JavaScript disabled, and hydration attaches to that same node.
|
|
54
|
+
*
|
|
55
|
+
* Value = the term (string). `selectedItem()` holds the last picked item until
|
|
56
|
+
* the text changes. Usable with `[(value)]`, `[(ngModel)]`, `formControlName`.
|
|
57
|
+
*/
|
|
12
58
|
class BsTypeaheadComponent {
|
|
13
59
|
constructor() {
|
|
14
|
-
|
|
15
|
-
this.
|
|
16
|
-
...(ngDevMode ? [{ debugName: "
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
60
|
+
/** Supplies suggestions for a settled term; a newer term aborts the previous request. */
|
|
61
|
+
this.provider = input(null, /* @ts-ignore */
|
|
62
|
+
...(ngDevMode ? [{ debugName: "provider" }] : /* istanbul ignore next */ []));
|
|
63
|
+
/** Quiet time after the last keystroke, ms. 0 requests synchronously. */
|
|
64
|
+
this.debounceMs = input(200, /* @ts-ignore */
|
|
65
|
+
...(ngDevMode ? [{ debugName: "debounceMs" }] : /* istanbul ignore next */ []));
|
|
66
|
+
/** A trimmed term shorter than this closes the list without querying. */
|
|
67
|
+
this.minLength = input(1, /* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [{ debugName: "minLength" }] : /* istanbul ignore next */ []));
|
|
69
|
+
this.disabled = input(false, /* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
71
|
+
/** The text a pick writes into the input. Default: `item.text`, else `String(item)`. */
|
|
72
|
+
this.itemText = input(undefined, /* @ts-ignore */
|
|
73
|
+
...(ngDevMode ? [{ debugName: "itemText" }] : /* istanbul ignore next */ []));
|
|
74
|
+
/** Row identity for keyed rendering. Default: `itemText`. */
|
|
75
|
+
this.itemKey = input(undefined, /* @ts-ignore */
|
|
76
|
+
...(ngDevMode ? [{ debugName: "itemKey" }] : /* istanbul ignore next */ []));
|
|
77
|
+
/** Submitted with a native `<form>` under this name (also with JavaScript disabled). */
|
|
78
|
+
this.name = input(null, /* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
80
|
+
/** Accessible name of the input. A host `aria-label` or `aria-labelledby` wins. */
|
|
22
81
|
this.inputLabel = input(null, /* @ts-ignore */
|
|
23
82
|
...(ngDevMode ? [{ debugName: "inputLabel" }] : /* istanbul ignore next */ []));
|
|
24
|
-
this.
|
|
25
|
-
...(ngDevMode ? [{ debugName: "
|
|
26
|
-
this.
|
|
27
|
-
...(ngDevMode ? [{ debugName: "
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
this.
|
|
36
|
-
...(ngDevMode ? [{ debugName: "
|
|
37
|
-
this.
|
|
38
|
-
...(ngDevMode ? [{ debugName: "isLoadingText" }] : /* istanbul ignore next */ []));
|
|
39
|
-
this.noSuggestionsText = input('No suggestions found', /* @ts-ignore */
|
|
40
|
-
...(ngDevMode ? [{ debugName: "noSuggestionsText" }] : /* istanbul ignore next */ []));
|
|
41
|
-
this.resultsAnnouncementSingular = input('1 result found', /* @ts-ignore */
|
|
42
|
-
...(ngDevMode ? [{ debugName: "resultsAnnouncementSingular" }] : /* istanbul ignore next */ []));
|
|
43
|
-
this.resultsAnnouncementPlural = input((count) => `${count} results found`, /* @ts-ignore */
|
|
44
|
-
...(ngDevMode ? [{ debugName: "resultsAnnouncementPlural" }] : /* istanbul ignore next */ []));
|
|
45
|
-
this.provideSuggestions = output();
|
|
46
|
-
this.suggestionSelected = output();
|
|
83
|
+
this.loadingLabel = input(undefined, /* @ts-ignore */
|
|
84
|
+
...(ngDevMode ? [{ debugName: "loadingLabel" }] : /* istanbul ignore next */ []));
|
|
85
|
+
this.noResultsLabel = input(undefined, /* @ts-ignore */
|
|
86
|
+
...(ngDevMode ? [{ debugName: "noResultsLabel" }] : /* istanbul ignore next */ []));
|
|
87
|
+
/** Spoken once per settled request, e.g. `n => n + ' resultaten'`. */
|
|
88
|
+
this.resultsLabel = input(undefined, /* @ts-ignore */
|
|
89
|
+
...(ngDevMode ? [{ debugName: "resultsLabel" }] : /* istanbul ignore next */ []));
|
|
90
|
+
/** A persistent validation message, wired to the input with aria-errormessage. */
|
|
91
|
+
this.errorText = input(null, /* @ts-ignore */
|
|
92
|
+
...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
93
|
+
/** The term. Two-way; also the ControlValueAccessor value. */
|
|
94
|
+
this.value = model('', /* @ts-ignore */
|
|
95
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
96
|
+
this.select = output();
|
|
47
97
|
this.submitted = output();
|
|
48
|
-
this.
|
|
98
|
+
this.opened = output();
|
|
99
|
+
this.closed = output();
|
|
100
|
+
this.loadError = output();
|
|
101
|
+
this.itemTemplate = contentChild(BsTypeaheadItemDirective, /* @ts-ignore */
|
|
102
|
+
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
103
|
+
this.inputRef = viewChild.required('input', /* @ts-ignore */
|
|
104
|
+
...(ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []));
|
|
105
|
+
this.id = inject(BsIdService).next('bs-typeahead');
|
|
106
|
+
/**
|
|
107
|
+
* Host transparency: a consumer's `aria-*`, `id` and `tabindex` on
|
|
108
|
+
* `<bs-typeahead>` land on the role-bearing input (`id` and `tabindex` are
|
|
109
|
+
* moved, so no duplicate id and no dead tab stop on the host). A consumer
|
|
110
|
+
* `role` is NOT forwarded: the input's role is `combobox` by contract. Read
|
|
111
|
+
* once, in the constructor, so the server render carries them too.
|
|
112
|
+
*/
|
|
113
|
+
this.hostAria = takeHostAria(inject(ElementRef).nativeElement);
|
|
114
|
+
this.disabledByCva = signal(false, /* @ts-ignore */
|
|
115
|
+
...(ngDevMode ? [{ debugName: "disabledByCva" }] : /* istanbul ignore next */ []));
|
|
116
|
+
this.onChange = () => undefined;
|
|
117
|
+
this.onTouched = () => undefined;
|
|
118
|
+
this.trackItem = (index, item) => this.machine.itemKeyOf(item) ?? index;
|
|
119
|
+
const host = inject(ElementRef).nativeElement;
|
|
120
|
+
useScopedStyles(TYPEAHEAD_SCOPE, typeaheadScopedStyles);
|
|
121
|
+
this.machine = new TypeaheadMachine({
|
|
122
|
+
id: this.id,
|
|
123
|
+
value: this.value(),
|
|
124
|
+
onChange: (term) => {
|
|
125
|
+
this.value.set(term);
|
|
126
|
+
this.onChange(term);
|
|
127
|
+
},
|
|
128
|
+
onSelect: (item) => this.select.emit(item),
|
|
129
|
+
onSubmit: (term) => this.submitted.emit(term),
|
|
130
|
+
onOpen: () => this.opened.emit(),
|
|
131
|
+
onClose: () => {
|
|
132
|
+
this.closed.emit();
|
|
133
|
+
this.onTouched();
|
|
134
|
+
},
|
|
135
|
+
onError: (error) => this.loadError.emit(error),
|
|
136
|
+
});
|
|
137
|
+
this.state = machineSignal(this.machine);
|
|
138
|
+
this.api = computed(() => {
|
|
139
|
+
const api = connect(this.state(), this.id, { name: this.name() });
|
|
140
|
+
// A host aria-label / aria-labelledby wins over inputLabel (naming conformance).
|
|
141
|
+
return { ...api, input: { ...api.input, ...this.hostAria } };
|
|
142
|
+
}, /* @ts-ignore */
|
|
143
|
+
...(ngDevMode ? [{ debugName: "api" }] : /* istanbul ignore next */ []));
|
|
144
|
+
this.selectedItem = computed(() => this.state().selectedItem, /* @ts-ignore */
|
|
145
|
+
...(ngDevMode ? [{ debugName: "selectedItem" }] : /* istanbul ignore next */ []));
|
|
146
|
+
inject(DestroyRef).onDestroy(() => this.machine.destroy());
|
|
147
|
+
// Inputs → machine configuration. Each effect reads one input so an
|
|
148
|
+
// unrelated input change does not re-apply everything.
|
|
49
149
|
effect(() => {
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
this.isLoading.set(false);
|
|
53
|
-
if (this.requestInFlight) {
|
|
54
|
-
this.requestInFlight = false;
|
|
55
|
-
this.announceResults(suggestions.length);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
150
|
+
const provider = this.provider();
|
|
151
|
+
this.machine.provider = provider ? adaptProvider(provider) : null;
|
|
58
152
|
});
|
|
153
|
+
effect(() => (this.machine.debounceMs = this.debounceMs()));
|
|
154
|
+
effect(() => (this.machine.minLength = this.minLength()));
|
|
155
|
+
effect(() => (this.machine.itemText = this.itemText()));
|
|
156
|
+
effect(() => (this.machine.itemKey = this.itemKey()));
|
|
157
|
+
effect(() => this.machine.setDisabled(this.disabled() || this.disabledByCva()));
|
|
158
|
+
effect(() => this.machine.setErrorText(this.errorText()));
|
|
159
|
+
effect(() => {
|
|
160
|
+
const labels = { input: this.inputLabel() };
|
|
161
|
+
const loading = this.loadingLabel();
|
|
162
|
+
const noResults = this.noResultsLabel();
|
|
163
|
+
const results = this.resultsLabel();
|
|
164
|
+
if (loading !== undefined)
|
|
165
|
+
labels.loading = loading;
|
|
166
|
+
if (noResults !== undefined)
|
|
167
|
+
labels.noResults = noResults;
|
|
168
|
+
if (results !== undefined)
|
|
169
|
+
labels.results = results;
|
|
170
|
+
this.machine.setLabels(labels);
|
|
171
|
+
});
|
|
172
|
+
// A consumer write to [(value)] (not an echo of our own onChange) is a programmatic set: no query.
|
|
173
|
+
effect(() => {
|
|
174
|
+
const next = this.value();
|
|
175
|
+
if (next !== untracked(() => this.machine.snapshot.term))
|
|
176
|
+
this.machine.setValue(next);
|
|
177
|
+
});
|
|
178
|
+
this.adoptPreHydrationText(host);
|
|
59
179
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Text typed or pasted into the server-rendered input before hydration lives
|
|
182
|
+
* only in the DOM. Hydration's [value] binding would overwrite it with the
|
|
183
|
+
* empty term, and the replayed input event then reads the empty field, so it
|
|
184
|
+
* is lost. Read it here, while the host still holds the server DOM, and keep
|
|
185
|
+
* it as the term; once effects have configured the provider, re-enter it as a
|
|
186
|
+
* typed term so it notifies the model and queries.
|
|
187
|
+
*/
|
|
188
|
+
adoptPreHydrationText(host) {
|
|
189
|
+
if (!isPlatformBrowser(inject(PLATFORM_ID)))
|
|
190
|
+
return;
|
|
191
|
+
const typed = host.querySelector('input')?.value ?? '';
|
|
192
|
+
if (!typed || typed === this.machine.snapshot.term)
|
|
193
|
+
return;
|
|
194
|
+
this.machine.setValue(typed);
|
|
195
|
+
this.value.set(typed);
|
|
196
|
+
afterNextRender(() => {
|
|
197
|
+
if (this.machine.snapshot.term !== typed)
|
|
198
|
+
return; // superseded by the consumer or the user
|
|
199
|
+
this.machine.setValue('');
|
|
200
|
+
this.machine.setTerm(typed);
|
|
201
|
+
});
|
|
70
202
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
this.isOpen.set(false);
|
|
75
|
-
this.requestInFlight = false;
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
this.requestInFlight = true;
|
|
79
|
-
this.isLoading.set(true);
|
|
80
|
-
this.isOpen.set(true);
|
|
81
|
-
this.provideSuggestions.emit(value);
|
|
82
|
-
}
|
|
203
|
+
// ---- template handlers --------------------------------------------------
|
|
204
|
+
onInput(event) {
|
|
205
|
+
this.machine.setTerm(event.target.value);
|
|
83
206
|
}
|
|
84
|
-
|
|
85
|
-
this.
|
|
86
|
-
|
|
87
|
-
|
|
207
|
+
onKeydown(event) {
|
|
208
|
+
const handled = this.machine.keydown(event.key, event);
|
|
209
|
+
if (handled)
|
|
210
|
+
event.preventDefault();
|
|
88
211
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
return;
|
|
93
|
-
const suggestion = this.suggestions()[rf.activeIndex()];
|
|
94
|
-
if (suggestion) {
|
|
95
|
-
this.suggestionClicked(suggestion);
|
|
96
|
-
}
|
|
212
|
+
onBlur() {
|
|
213
|
+
this.machine.blur();
|
|
214
|
+
this.onTouched();
|
|
97
215
|
}
|
|
98
|
-
|
|
99
|
-
|
|
216
|
+
/** Focus the input. */
|
|
217
|
+
focus() {
|
|
218
|
+
this.inputRef().nativeElement.focus();
|
|
100
219
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
this.
|
|
105
|
-
this.submitted.emit(this.searchterm());
|
|
220
|
+
// ---- ControlValueAccessor -----------------------------------------------
|
|
221
|
+
writeValue(value) {
|
|
222
|
+
this.value.set(value ?? '');
|
|
223
|
+
this.machine.setValue(value);
|
|
106
224
|
}
|
|
107
|
-
|
|
108
|
-
this.
|
|
225
|
+
registerOnChange(fn) {
|
|
226
|
+
this.onChange = fn;
|
|
227
|
+
}
|
|
228
|
+
registerOnTouched(fn) {
|
|
229
|
+
this.onTouched = fn;
|
|
230
|
+
}
|
|
231
|
+
setDisabledState(isDisabled) {
|
|
232
|
+
this.disabledByCva.set(isDisabled);
|
|
109
233
|
}
|
|
110
234
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTypeaheadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
111
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTypeaheadComponent, isStandalone: true, selector: "bs-typeahead", inputs: {
|
|
235
|
+
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", select: "select", submitted: "submitted", opened: "opened", closed: "closed", loadError: "loadError" }, host: { attributes: { "role": "presentation" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTypeaheadComponent), multi: true }], queries: [{ propertyName: "itemTemplate", first: true, predicate: BsTypeaheadItemDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "<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", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
112
236
|
}
|
|
113
237
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTypeaheadComponent, decorators: [{
|
|
114
238
|
type: Component,
|
|
115
|
-
args: [{ selector: 'bs-typeahead', imports: [
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
239
|
+
args: [{ selector: 'bs-typeahead', imports: [NgTemplateOutlet, MpPropsDirective], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTypeaheadComponent), multi: true }], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'presentation' }, template: "<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" }]
|
|
240
|
+
}], 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"] }], select: [{ type: i0.Output, args: ["select"] }], submitted: [{ type: i0.Output, args: ["submitted"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], loadError: [{ type: i0.Output, args: ["loadError"] }], itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTypeaheadItemDirective), { isSignal: true }] }], inputRef: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }] } });
|
|
241
|
+
/** Collect `aria-*` (copied) and `id` / `tabindex` (moved) from the host element. */
|
|
242
|
+
function takeHostAria(host) {
|
|
243
|
+
const bag = Object.fromEntries(Array.from(host.attributes)
|
|
244
|
+
.filter(({ name }) => name.startsWith('aria-') || name === 'id' || name === 'tabindex')
|
|
245
|
+
.map(({ name, value }) => [name, value]));
|
|
246
|
+
['id', 'tabindex'].filter((name) => name in bag).forEach((name) => host.removeAttribute(name));
|
|
247
|
+
return bag;
|
|
248
|
+
}
|
|
249
|
+
/** Promise or Observable in, Promise out; the Observable is unsubscribed when the request aborts. */
|
|
250
|
+
function adaptProvider(provider) {
|
|
251
|
+
return (term, request) => {
|
|
252
|
+
const result = provider(term, request);
|
|
253
|
+
if (!isObservable(result))
|
|
254
|
+
return result;
|
|
255
|
+
return new Promise((resolve, reject) => {
|
|
256
|
+
const subscription = result.subscribe({
|
|
257
|
+
next: (items) => {
|
|
258
|
+
resolve(items);
|
|
259
|
+
subscription.unsubscribe();
|
|
260
|
+
},
|
|
261
|
+
error: reject,
|
|
262
|
+
complete: () => resolve([]),
|
|
263
|
+
});
|
|
264
|
+
request.signal.addEventListener('abort', () => {
|
|
265
|
+
subscription.unsubscribe();
|
|
266
|
+
reject(abortError());
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
};
|
|
270
|
+
}
|
|
124
271
|
|
|
125
272
|
/**
|
|
126
273
|
* Generated bundle index. Do not edit.
|
|
127
274
|
*/
|
|
128
275
|
|
|
129
|
-
export { BsTypeaheadComponent };
|
|
276
|
+
export { BsTypeaheadComponent, BsTypeaheadItemDirective };
|
|
130
277
|
//# 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/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;AAErB;;;;AAIG;QACH,IAAA,CAAA,UAAU,GAAG,KAAK,CAAgB,IAAI;uFAAC;QAEvC,IAAA,CAAA,WAAW,GAAG,KAAK,CAAQ,EAAE;wFAAC;QA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rap-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;AAHC,IAAA,OAAO,sBAAsB,CAAI,IAAiC,EAAE,GAAY,EAAA;AAC9E,QAAA,OAAO,IAAI;IACb;8GAPW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA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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.26.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.0.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": "^2.
|
|
432
|
+
"@mintplayer/web-components": "^2.21.0",
|
|
428
433
|
"lit": "^3.3.0"
|
|
429
434
|
},
|
|
430
435
|
"dependencies": {
|