@spartan-ng/brain 0.0.1-alpha.603 → 0.0.1-alpha.605
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/combobox/README.md +3 -0
- package/combobox/index.d.ts +377 -0
- package/core/index.d.ts +4 -1
- package/fesm2022/spartan-ng-brain-combobox.mjs +919 -0
- package/fesm2022/spartan-ng-brain-combobox.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-core.mjs +30 -1
- package/fesm2022/spartan-ng-brain-core.mjs.map +1 -1
- package/package.json +9 -5
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InputSignal, Signal, WritableSignal, ModelSignal, InjectionToken, Type, ExistingProvider, ValueProvider } from '@angular/core';
|
|
3
|
+
import { Highlightable, ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
|
4
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
5
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
6
|
+
import { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';
|
|
7
|
+
|
|
8
|
+
declare class BrnComboboxItem<T> implements Highlightable {
|
|
9
|
+
private static _id;
|
|
10
|
+
private readonly _platform;
|
|
11
|
+
private readonly _elementRef;
|
|
12
|
+
/** Access the combobox component */
|
|
13
|
+
private readonly _combobox;
|
|
14
|
+
/** A unique id for the item */
|
|
15
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
16
|
+
/** The value this item represents. */
|
|
17
|
+
readonly value: _angular_core.InputSignal<T>;
|
|
18
|
+
readonly _disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
19
|
+
/** Expose disabled as a value - used by the Highlightable interface */
|
|
20
|
+
get disabled(): boolean;
|
|
21
|
+
/** Whether the item is selected. */
|
|
22
|
+
readonly active: _angular_core.Signal<boolean>;
|
|
23
|
+
protected readonly _highlighted: _angular_core.WritableSignal<boolean>;
|
|
24
|
+
/** @internal Determine if this item is visible based on the current search query */
|
|
25
|
+
readonly visible: _angular_core.Signal<boolean>;
|
|
26
|
+
setActiveStyles(): void;
|
|
27
|
+
setInactiveStyles(): void;
|
|
28
|
+
getLabel(): string;
|
|
29
|
+
protected select(): void;
|
|
30
|
+
protected activate(): void;
|
|
31
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxItem<any>, never>;
|
|
32
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxItem<any>, "[brnComboboxItem]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "_disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface BrnComboboxBase<T> {
|
|
36
|
+
filter: InputSignal<ComboboxFilter<T>>;
|
|
37
|
+
itemToString: InputSignal<ComboboxItemToString<T> | undefined>;
|
|
38
|
+
collator: Signal<Intl.Collator>;
|
|
39
|
+
search: WritableSignal<string>;
|
|
40
|
+
disabled: Signal<boolean>;
|
|
41
|
+
disabledState: Signal<boolean>;
|
|
42
|
+
keyManager: ActiveDescendantKeyManager<BrnComboboxItem<T>>;
|
|
43
|
+
value: ModelSignal<T | null> | ModelSignal<T[] | null>;
|
|
44
|
+
visibleItems: Signal<boolean>;
|
|
45
|
+
isExpanded: Signal<boolean>;
|
|
46
|
+
searchInputWrapperWidth: Signal<number | null>;
|
|
47
|
+
isSelected: (itemValue: T) => boolean;
|
|
48
|
+
select: (itemValue: T) => void;
|
|
49
|
+
open: () => void;
|
|
50
|
+
resetValue: () => void;
|
|
51
|
+
/** Select the active item with Enter key. */
|
|
52
|
+
selectActiveItem: () => void;
|
|
53
|
+
/** Remove last selected item with Backspace key. Only works with multiple selection comboboxes. */
|
|
54
|
+
removeLastSelectedItem: () => void;
|
|
55
|
+
removeValue: (value: T) => void;
|
|
56
|
+
}
|
|
57
|
+
declare const BrnComboboxBaseToken: InjectionToken<BrnComboboxBase<unknown>>;
|
|
58
|
+
declare function provideBrnComboboxBase<T>(instance: Type<BrnComboboxBase<T>>): ExistingProvider;
|
|
59
|
+
/**
|
|
60
|
+
* Inject the combobox component.
|
|
61
|
+
*/
|
|
62
|
+
declare function injectBrnComboboxBase<T>(): BrnComboboxBase<T>;
|
|
63
|
+
interface ComboboxFilterOptions extends Intl.CollatorOptions {
|
|
64
|
+
/**
|
|
65
|
+
* The locale to use for string comparison.
|
|
66
|
+
* Defaults to the user's runtime locale.
|
|
67
|
+
*/
|
|
68
|
+
locale?: Intl.LocalesArgument;
|
|
69
|
+
}
|
|
70
|
+
type ComboboxFilter<T> = (itemValue: T, search: string, collator: Intl.Collator, itemToString?: ComboboxItemToString<T>) => boolean;
|
|
71
|
+
type ComboboxItemEqualToValue<T> = (itemValue: T, selectedValue: T | null) => boolean;
|
|
72
|
+
type ComboboxItemToString<T> = (itemValue: T) => string;
|
|
73
|
+
interface BrnComboboxConfig<T> {
|
|
74
|
+
filterOptions: ComboboxFilterOptions;
|
|
75
|
+
filter: ComboboxFilter<T>;
|
|
76
|
+
isItemEqualToValue: ComboboxItemEqualToValue<T>;
|
|
77
|
+
itemToString?: ComboboxItemToString<T>;
|
|
78
|
+
}
|
|
79
|
+
declare function provideBrnComboboxConfig<T>(config: Partial<BrnComboboxConfig<T>>): ValueProvider;
|
|
80
|
+
declare function injectBrnComboboxConfig<T>(): BrnComboboxConfig<T>;
|
|
81
|
+
|
|
82
|
+
declare const BRN_COMBOBOX_VALUE_ACCESSOR: {
|
|
83
|
+
provide: _angular_core.InjectionToken<readonly ControlValueAccessor[]>;
|
|
84
|
+
useExisting: _angular_core.Type<any>;
|
|
85
|
+
multi: boolean;
|
|
86
|
+
};
|
|
87
|
+
declare class BrnCombobox<T> implements BrnComboboxBase<T>, ControlValueAccessor {
|
|
88
|
+
private readonly _injector;
|
|
89
|
+
private readonly _config;
|
|
90
|
+
/** Access the popover if present */
|
|
91
|
+
private readonly _brnPopover;
|
|
92
|
+
/** Whether the combobox is disabled */
|
|
93
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
94
|
+
protected readonly _disabled: _angular_core.WritableSignal<boolean>;
|
|
95
|
+
/** @internal The disabled state as a readonly signal */
|
|
96
|
+
readonly disabledState: _angular_core.Signal<boolean>;
|
|
97
|
+
/** Options for filtering the combobox items */
|
|
98
|
+
readonly filterOptions: _angular_core.InputSignal<ComboboxFilterOptions>;
|
|
99
|
+
/** @internal The collator used for string comparison */
|
|
100
|
+
readonly collator: _angular_core.Signal<Intl.Collator>;
|
|
101
|
+
/** A function to compare an item with the selected value. */
|
|
102
|
+
readonly isItemEqualToValue: _angular_core.InputSignal<ComboboxItemEqualToValue<T>>;
|
|
103
|
+
/** A function to convert an item to a string for display. */
|
|
104
|
+
readonly itemToString: _angular_core.InputSignal<ComboboxItemToString<T> | undefined>;
|
|
105
|
+
/** A custom filter function to use when searching. */
|
|
106
|
+
readonly filter: _angular_core.InputSignal<ComboboxFilter<T>>;
|
|
107
|
+
/** The selected value of the combobox. */
|
|
108
|
+
readonly value: _angular_core.ModelSignal<T | null>;
|
|
109
|
+
/** The current search query. */
|
|
110
|
+
readonly search: _angular_core.WritableSignal<string>;
|
|
111
|
+
private readonly _searchInputWrapper;
|
|
112
|
+
/** @internal The width of the search input wrapper */
|
|
113
|
+
readonly searchInputWrapperWidth: _angular_core.Signal<number | null>;
|
|
114
|
+
/** @internal Access all the items within the combobox */
|
|
115
|
+
readonly items: _angular_core.Signal<readonly BrnComboboxItem<T>[]>;
|
|
116
|
+
/** Determine if the combobox has any visible items */
|
|
117
|
+
readonly visibleItems: _angular_core.Signal<boolean>;
|
|
118
|
+
/** @internal The key manager for managing active descendant */
|
|
119
|
+
readonly keyManager: ActiveDescendantKeyManager<BrnComboboxItem<T>>;
|
|
120
|
+
/** @internal Whether the combobox is expanded */
|
|
121
|
+
readonly isExpanded: _angular_core.Signal<boolean>;
|
|
122
|
+
protected _onChange?: ChangeFn<T | null>;
|
|
123
|
+
protected _onTouched?: TouchFn;
|
|
124
|
+
constructor();
|
|
125
|
+
isSelected(itemValue: T): boolean;
|
|
126
|
+
select(itemValue: T): void;
|
|
127
|
+
/** Select the active item with Enter key. */
|
|
128
|
+
selectActiveItem(): void;
|
|
129
|
+
resetValue(): void;
|
|
130
|
+
removeValue(_: T): void;
|
|
131
|
+
removeLastSelectedItem(): void;
|
|
132
|
+
open(): void;
|
|
133
|
+
private close;
|
|
134
|
+
/** CONTROL VALUE ACCESSOR */
|
|
135
|
+
writeValue(value: T | null): void;
|
|
136
|
+
registerOnChange(fn: ChangeFn<T | null>): void;
|
|
137
|
+
registerOnTouched(fn: TouchFn): void;
|
|
138
|
+
setDisabledState(isDisabled: boolean): void;
|
|
139
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnCombobox<any>, never>;
|
|
140
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnCombobox<any>, "[brnCombobox]", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "filterOptions": { "alias": "filterOptions"; "required": false; "isSignal": true; }; "isItemEqualToValue": { "alias": "isItemEqualToValue"; "required": false; "isSignal": true; }; "itemToString": { "alias": "itemToString"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["_searchInputWrapper", "items"], never, true, never>;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
declare class BrnComboboxAnchor {
|
|
144
|
+
private readonly _host;
|
|
145
|
+
private readonly _brnDialog;
|
|
146
|
+
private readonly _content;
|
|
147
|
+
constructor();
|
|
148
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxAnchor, never>;
|
|
149
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxAnchor, "[brnComboboxAnchor]", never, {}, {}, never, never, true, never>;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
declare class BrnComboboxChip<T> {
|
|
153
|
+
private readonly _combobox;
|
|
154
|
+
protected readonly _disabled: _angular_core.Signal<boolean>;
|
|
155
|
+
readonly value: _angular_core.InputSignal<T>;
|
|
156
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxChip<any>, never>;
|
|
157
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxChip<any>, "[brnComboboxChip]", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare class BrnComboboxChipInput<T> {
|
|
161
|
+
private static _id;
|
|
162
|
+
private readonly _el;
|
|
163
|
+
private readonly _combobox;
|
|
164
|
+
/** The id of the combobox input */
|
|
165
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
166
|
+
protected readonly _disabled: _angular_core.Signal<boolean>;
|
|
167
|
+
/** Whether the combobox panel is expanded */
|
|
168
|
+
protected readonly _isExpanded: _angular_core.Signal<boolean>;
|
|
169
|
+
constructor();
|
|
170
|
+
protected onInput(event: Event): void;
|
|
171
|
+
/** Listen for keydown events */
|
|
172
|
+
protected onKeyDown(event: KeyboardEvent): void;
|
|
173
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxChipInput<any>, never>;
|
|
174
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxChipInput<any>, "input[brnComboboxChipInput]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
declare class BrnComboboxChipRemove<T> {
|
|
178
|
+
private readonly _combobox;
|
|
179
|
+
private readonly _chip;
|
|
180
|
+
protected readonly _disabled: _angular_core.Signal<boolean>;
|
|
181
|
+
protected removeChip(event: Event): void;
|
|
182
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxChipRemove<any>, never>;
|
|
183
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxChipRemove<any>, "button[brnComboboxChipRemove]", never, {}, {}, never, never, true, never>;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
declare class BrnComboboxClear {
|
|
187
|
+
private readonly _combobox;
|
|
188
|
+
private readonly _renderer;
|
|
189
|
+
private readonly _templateRef;
|
|
190
|
+
private readonly _viewContainerRef;
|
|
191
|
+
/** Determine if the combobox has a value */
|
|
192
|
+
private readonly _hasValue;
|
|
193
|
+
constructor();
|
|
194
|
+
private clear;
|
|
195
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxClear, never>;
|
|
196
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxClear, "[brnComboboxClear]", never, {}, {}, never, never, true, never>;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
declare class BrnComboboxContent {
|
|
200
|
+
private readonly _combobox;
|
|
201
|
+
/** Determine if the combobox has any visible items */
|
|
202
|
+
protected readonly _visibleItems: _angular_core.Signal<boolean>;
|
|
203
|
+
protected readonly _comboboxWidth: _angular_core.Signal<number | null>;
|
|
204
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxContent, never>;
|
|
205
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxContent, "[brnComboboxContent]", never, {}, {}, never, never, true, never>;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
declare class BrnComboboxEmpty {
|
|
209
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxEmpty, never>;
|
|
210
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxEmpty, "[brnComboboxEmpty]", never, {}, {}, never, never, true, never>;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare class BrnComboboxGroup {
|
|
214
|
+
/** Get the items in the group */
|
|
215
|
+
private readonly _items;
|
|
216
|
+
/** Determine if there are any visible items in the group */
|
|
217
|
+
protected readonly _visible: _angular_core.Signal<boolean>;
|
|
218
|
+
/** Get the label associated with the group */
|
|
219
|
+
private readonly _label;
|
|
220
|
+
protected readonly _labelledBy: _angular_core.Signal<string | null>;
|
|
221
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxGroup, never>;
|
|
222
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxGroup, "[brnComboboxGroup]", never, {}, {}, ["_items", "_label"], never, true, never>;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
declare class BrnComboboxInput<T> {
|
|
226
|
+
private static _id;
|
|
227
|
+
private readonly _el;
|
|
228
|
+
private readonly _combobox;
|
|
229
|
+
private readonly _content;
|
|
230
|
+
private readonly _mode;
|
|
231
|
+
/** The id of the combobox input */
|
|
232
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
233
|
+
readonly disabled: _angular_core.Signal<boolean>;
|
|
234
|
+
/** Whether the combobox panel is expanded */
|
|
235
|
+
protected readonly _isExpanded: _angular_core.Signal<boolean>;
|
|
236
|
+
constructor();
|
|
237
|
+
protected onInput(event: Event): void;
|
|
238
|
+
/** Listen for keydown events */
|
|
239
|
+
protected onKeyDown(event: KeyboardEvent): void;
|
|
240
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxInput<any>, never>;
|
|
241
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxInput<any>, "input[brnComboboxInput]", ["brnComboboxInput"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
declare class BrnComboboxInputWrapper {
|
|
245
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxInputWrapper, never>;
|
|
246
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxInputWrapper, "[brnComboboxInputWrapper]", never, {}, {}, never, never, true, never>;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
declare class BrnComboboxLabel {
|
|
250
|
+
private static _id;
|
|
251
|
+
/** The id of the combobox label */
|
|
252
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
253
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxLabel, never>;
|
|
254
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxLabel, "[brnComboboxLabel]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
declare class BrnComboboxList {
|
|
258
|
+
private static _id;
|
|
259
|
+
private readonly _combobox;
|
|
260
|
+
/** Determine if the combobox has any visible items */
|
|
261
|
+
protected readonly _visibleItems: _angular_core.Signal<boolean>;
|
|
262
|
+
/** The id of the combobox list */
|
|
263
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
264
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxList, never>;
|
|
265
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxList, "[brnComboboxList]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
declare const BRN_COMBOBOX_MULTIPLE_VALUE_ACCESSOR: {
|
|
269
|
+
provide: _angular_core.InjectionToken<readonly ControlValueAccessor[]>;
|
|
270
|
+
useExisting: _angular_core.Type<any>;
|
|
271
|
+
multi: boolean;
|
|
272
|
+
};
|
|
273
|
+
declare class BrnComboboxMultiple<T> implements BrnComboboxBase<T>, ControlValueAccessor {
|
|
274
|
+
private readonly _injector;
|
|
275
|
+
private readonly _config;
|
|
276
|
+
/** Access the popover if present */
|
|
277
|
+
private readonly _brnPopover;
|
|
278
|
+
/** Whether the combobox is disabled */
|
|
279
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
280
|
+
protected readonly _disabled: _angular_core.WritableSignal<boolean>;
|
|
281
|
+
/** @internal The disabled state as a readonly signal */
|
|
282
|
+
readonly disabledState: _angular_core.Signal<boolean>;
|
|
283
|
+
/** Options for filtering the combobox items */
|
|
284
|
+
readonly filterOptions: _angular_core.InputSignal<ComboboxFilterOptions>;
|
|
285
|
+
/** @internal The collator used for string comparison */
|
|
286
|
+
readonly collator: _angular_core.Signal<Intl.Collator>;
|
|
287
|
+
/** A function to compare an item with the selected value. */
|
|
288
|
+
readonly isItemEqualToValue: _angular_core.InputSignal<ComboboxItemEqualToValue<T>>;
|
|
289
|
+
/** A function to convert an item to a string for display. */
|
|
290
|
+
readonly itemToString: _angular_core.InputSignal<ComboboxItemToString<T> | undefined>;
|
|
291
|
+
/** A custom filter function to use when searching. */
|
|
292
|
+
readonly filter: _angular_core.InputSignal<ComboboxFilter<T>>;
|
|
293
|
+
/** The selected values of the combobox. */
|
|
294
|
+
readonly value: _angular_core.ModelSignal<T[] | null>;
|
|
295
|
+
/** The current search query. */
|
|
296
|
+
readonly search: _angular_core.WritableSignal<string>;
|
|
297
|
+
private readonly _searchInputWrapper;
|
|
298
|
+
readonly searchInputWrapperWidth: _angular_core.Signal<number | null>;
|
|
299
|
+
/** @internal Access all the items within the combobox */
|
|
300
|
+
readonly items: _angular_core.Signal<readonly BrnComboboxItem<T>[]>;
|
|
301
|
+
/** Determine if the combobox has any visible items */
|
|
302
|
+
readonly visibleItems: _angular_core.Signal<boolean>;
|
|
303
|
+
/** @internal The key manager for managing active descendant */
|
|
304
|
+
readonly keyManager: ActiveDescendantKeyManager<BrnComboboxItem<T>>;
|
|
305
|
+
/** @internal Whether the autocomplete is expanded */
|
|
306
|
+
readonly isExpanded: _angular_core.Signal<boolean>;
|
|
307
|
+
protected _onChange?: ChangeFn<T[] | null>;
|
|
308
|
+
protected _onTouched?: TouchFn;
|
|
309
|
+
constructor();
|
|
310
|
+
isSelected(itemValue: T): boolean;
|
|
311
|
+
select(itemValue: T): void;
|
|
312
|
+
/** Select the active item with Enter key. */
|
|
313
|
+
selectActiveItem(): void;
|
|
314
|
+
resetValue(): void;
|
|
315
|
+
removeValue(itemValue: T): void;
|
|
316
|
+
removeLastSelectedItem(): void;
|
|
317
|
+
open(): void;
|
|
318
|
+
private close;
|
|
319
|
+
/** CONTROL VALUE ACCESSOR */
|
|
320
|
+
writeValue(value: T[] | null): void;
|
|
321
|
+
registerOnChange(fn: ChangeFn<T[] | null>): void;
|
|
322
|
+
registerOnTouched(fn: TouchFn): void;
|
|
323
|
+
setDisabledState(isDisabled: boolean): void;
|
|
324
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxMultiple<any>, never>;
|
|
325
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxMultiple<any>, "[brnCombobox]", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "filterOptions": { "alias": "filterOptions"; "required": false; "isSignal": true; }; "isItemEqualToValue": { "alias": "isItemEqualToValue"; "required": false; "isSignal": true; }; "itemToString": { "alias": "itemToString"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["_searchInputWrapper", "items"], never, true, never>;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
declare class BrnComboboxPopoverTrigger<T> {
|
|
329
|
+
private readonly _combobox;
|
|
330
|
+
private readonly _brnDialog;
|
|
331
|
+
protected open(): void;
|
|
332
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxPopoverTrigger<any>, never>;
|
|
333
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxPopoverTrigger<any>, "[brnComboboxPopoverTrigger]", never, {}, {}, never, never, true, never>;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
declare class BrnComboboxSeparator {
|
|
337
|
+
readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
|
|
338
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxSeparator, never>;
|
|
339
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxSeparator, "[brnComboboxSeparator]", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
declare class BrnComboboxTrigger<T> {
|
|
343
|
+
private readonly _combobox;
|
|
344
|
+
protected readonly _disabled: _angular_core.Signal<boolean>;
|
|
345
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxTrigger<any>, never>;
|
|
346
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxTrigger<any>, "button[brnComboboxTrigger]", never, {}, {}, never, never, true, never>;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
declare class BrnComboboxValue<T> {
|
|
350
|
+
private readonly _combobox;
|
|
351
|
+
protected readonly _value: _angular_core.Signal<string>;
|
|
352
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxValue<any>, never>;
|
|
353
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxValue<any>, "[brnComboboxValue]", never, {}, {}, never, never, true, never>;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
declare class BrnComboboxValues<T> {
|
|
357
|
+
private readonly _templateRef;
|
|
358
|
+
private readonly _viewContainerRef;
|
|
359
|
+
private readonly _combobox;
|
|
360
|
+
protected readonly _values: _angular_core.Signal<T[] | null>;
|
|
361
|
+
constructor();
|
|
362
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxValues<any>, never>;
|
|
363
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxValues<any>, "[brnComboboxValues]", never, {}, {}, never, never, true, never>;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
type BrnComboboxFilter = <Item>(item: Item, query: string, collator: Intl.Collator, itemToString?: (item: Item) => string) => boolean;
|
|
367
|
+
declare const comboboxContainsFilter: BrnComboboxFilter;
|
|
368
|
+
declare const comboboxStartsWithFilter: BrnComboboxFilter;
|
|
369
|
+
declare const comboboxEndsWithFilter: BrnComboboxFilter;
|
|
370
|
+
|
|
371
|
+
declare const BrnComboboxItemToken: InjectionToken<BrnComboboxItem<unknown>>;
|
|
372
|
+
declare function provideBrnComboboxItem<T>(Combobox: Type<BrnComboboxItem<T>>): ExistingProvider;
|
|
373
|
+
|
|
374
|
+
declare const BrnComboboxImports: readonly [typeof BrnCombobox, typeof BrnComboboxAnchor, typeof BrnComboboxChip, typeof BrnComboboxChipInput, typeof BrnComboboxChipRemove, typeof BrnComboboxClear, typeof BrnComboboxContent, typeof BrnComboboxEmpty, typeof BrnComboboxGroup, typeof BrnComboboxInputWrapper, typeof BrnComboboxInput, typeof BrnComboboxItem, typeof BrnComboboxLabel, typeof BrnComboboxList, typeof BrnComboboxMultiple, typeof BrnComboboxPopoverTrigger, typeof BrnComboboxSeparator, typeof BrnComboboxTrigger, typeof BrnComboboxValue, typeof BrnComboboxValues];
|
|
375
|
+
|
|
376
|
+
export { BRN_COMBOBOX_MULTIPLE_VALUE_ACCESSOR, BRN_COMBOBOX_VALUE_ACCESSOR, BrnCombobox, BrnComboboxAnchor, BrnComboboxBaseToken, BrnComboboxChip, BrnComboboxChipInput, BrnComboboxChipRemove, BrnComboboxClear, BrnComboboxContent, BrnComboboxEmpty, BrnComboboxGroup, BrnComboboxImports, BrnComboboxInput, BrnComboboxInputWrapper, BrnComboboxItem, BrnComboboxItemToken, BrnComboboxLabel, BrnComboboxList, BrnComboboxMultiple, BrnComboboxPopoverTrigger, BrnComboboxSeparator, BrnComboboxTrigger, BrnComboboxValue, BrnComboboxValues, comboboxContainsFilter, comboboxEndsWithFilter, comboboxStartsWithFilter, injectBrnComboboxBase, injectBrnComboboxConfig, provideBrnComboboxBase, provideBrnComboboxConfig, provideBrnComboboxItem };
|
|
377
|
+
export type { BrnComboboxBase, BrnComboboxConfig, BrnComboboxFilter, ComboboxFilter, ComboboxFilterOptions, ComboboxItemEqualToValue, ComboboxItemToString };
|
package/core/index.d.ts
CHANGED
|
@@ -118,6 +118,9 @@ type MenuAlign = 'start' | 'center' | 'end';
|
|
|
118
118
|
type MenuSide = 'top' | 'bottom' | 'left' | 'right';
|
|
119
119
|
declare const createMenuPosition: (align: MenuAlign, side: MenuSide) => ConnectedPosition[];
|
|
120
120
|
|
|
121
|
+
declare function stringifyAsLabel(item: any, itemToStringLabel?: (item: any) => string): string;
|
|
122
|
+
declare function serializeValue(value: unknown): string;
|
|
123
|
+
|
|
121
124
|
interface TableClassesSettable {
|
|
122
125
|
setTableClasses: (classes: Partial<{
|
|
123
126
|
table: string;
|
|
@@ -154,5 +157,5 @@ declare function brnZoneFull<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
|
|
|
154
157
|
declare function brnZoneFree<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
|
|
155
158
|
declare function brnZoneOptimized<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
|
|
156
159
|
|
|
157
|
-
export { EXPOSES_SIDE_TOKEN, EXPOSES_STATE_TOKEN, SET_CLASS_TO_CUSTOM_ELEMENT_TOKEN, SET_TABLE_CLASSES_TOKEN, brnDevMode, brnZoneFree, brnZoneFull, brnZoneOptimized, computedPrevious, createHoverObservable, createMenuPosition, debouncedSignal, injectCustomClassSettable, injectExposedSideProvider, injectExposesStateProvider, injectTableClassesSettable, isElement, measureDimensions, provideCustomClassSettable, provideCustomClassSettableExisting, provideExposedSideProvider, provideExposedSideProviderExisting, provideExposesStateProvider, provideExposesStateProviderExisting, provideTableClassesSettable, provideTableClassesSettableExisting, waitForElementAnimations };
|
|
160
|
+
export { EXPOSES_SIDE_TOKEN, EXPOSES_STATE_TOKEN, SET_CLASS_TO_CUSTOM_ELEMENT_TOKEN, SET_TABLE_CLASSES_TOKEN, brnDevMode, brnZoneFree, brnZoneFull, brnZoneOptimized, computedPrevious, createHoverObservable, createMenuPosition, debouncedSignal, injectCustomClassSettable, injectExposedSideProvider, injectExposesStateProvider, injectTableClassesSettable, isElement, measureDimensions, provideCustomClassSettable, provideCustomClassSettableExisting, provideExposedSideProvider, provideExposedSideProviderExisting, provideExposesStateProvider, provideExposesStateProviderExisting, provideTableClassesSettable, provideTableClassesSettableExisting, serializeValue, stringifyAsLabel, waitForElementAnimations };
|
|
158
161
|
export type { CustomElementClassSettable, ExposesSide, ExposesState, MeasurementDisplay, MenuAlign, MenuSide, TableClassesSettable };
|