@spartan-ng/brain 0.0.1-alpha.681 → 0.0.1-alpha.682
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/autocomplete/index.d.ts +11 -11
- package/combobox/index.d.ts +11 -11
- package/dialog/index.d.ts +2 -0
- package/fesm2022/spartan-ng-brain-autocomplete.mjs +26 -39
- package/fesm2022/spartan-ng-brain-autocomplete.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-combobox.mjs +26 -39
- package/fesm2022/spartan-ng-brain-combobox.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-core.mjs +3 -2
- package/fesm2022/spartan-ng-brain-core.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-dialog.mjs +6 -0
- package/fesm2022/spartan-ng-brain-dialog.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-select.mjs +25 -39
- package/fesm2022/spartan-ng-brain-select.mjs.map +1 -1
- package/package.json +1 -1
- package/select/index.d.ts +10 -11
package/autocomplete/index.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ interface BrnAutocompleteBase<T> {
|
|
|
74
74
|
/** Select the active item with Enter key. */
|
|
75
75
|
selectActiveItem: () => void;
|
|
76
76
|
registerAutocompleteInput: (input: BrnAutocompleteInput<T>) => void;
|
|
77
|
+
updateInputWidth: (width: number | null) => void;
|
|
77
78
|
}
|
|
78
79
|
declare const BrnAutocompleteBaseToken: InjectionToken<BrnAutocompleteBase<unknown>>;
|
|
79
80
|
declare function provideBrnAutocompleteBase<T>(autocomplete: Type<BrnAutocompleteBase<T>>): ExistingProvider;
|
|
@@ -114,7 +115,7 @@ declare class BrnAutocomplete<T> implements BrnAutocompleteBase<T>, ControlValue
|
|
|
114
115
|
readonly value: _angular_core.ModelSignal<T | null>;
|
|
115
116
|
/** The current search query. */
|
|
116
117
|
readonly search: _angular_core.ModelSignal<string>;
|
|
117
|
-
private readonly
|
|
118
|
+
private readonly _inputWidth;
|
|
118
119
|
/** @internal The width of the search input wrapper */
|
|
119
120
|
readonly searchInputWrapperWidth: _angular_core.Signal<number | null>;
|
|
120
121
|
/** @internal Access all the items within the autocomplete */
|
|
@@ -132,6 +133,7 @@ declare class BrnAutocomplete<T> implements BrnAutocompleteBase<T>, ControlValue
|
|
|
132
133
|
readonly controlState: _angular_core.Signal<_spartan_ng_brain_forms.ControlState | null> | undefined;
|
|
133
134
|
constructor();
|
|
134
135
|
registerAutocompleteInput(input: BrnAutocompleteInput<T>): void;
|
|
136
|
+
updateInputWidth(width: number | null): void;
|
|
135
137
|
updateSearch(value: string): void;
|
|
136
138
|
isSelected(itemValue: T): boolean;
|
|
137
139
|
select(itemValue: T): void;
|
|
@@ -148,12 +150,14 @@ declare class BrnAutocomplete<T> implements BrnAutocompleteBase<T>, ControlValue
|
|
|
148
150
|
setDisabledState(isDisabled: boolean): void;
|
|
149
151
|
protected _onFocusOut(event: FocusEvent): void;
|
|
150
152
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnAutocomplete<any>, never>;
|
|
151
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnAutocomplete<any>, "[brnAutocomplete]", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "isItemEqualToValue": { "alias": "isItemEqualToValue"; "required": false; "isSignal": true; }; "itemToString": { "alias": "itemToString"; "required": false; "isSignal": true; }; "autoHighlight": { "alias": "autoHighlight"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "search": "searchChange"; }, ["
|
|
153
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnAutocomplete<any>, "[brnAutocomplete]", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "isItemEqualToValue": { "alias": "isItemEqualToValue"; "required": false; "isSignal": true; }; "itemToString": { "alias": "itemToString"; "required": false; "isSignal": true; }; "autoHighlight": { "alias": "autoHighlight"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "search": "searchChange"; }, ["items"], never, true, [{ directive: typeof i1.BrnFieldControl; inputs: {}; outputs: {}; }]>;
|
|
152
154
|
}
|
|
153
155
|
|
|
154
156
|
declare class BrnAutocompleteAnchor {
|
|
155
157
|
private readonly _host;
|
|
156
158
|
private readonly _brnDialog;
|
|
159
|
+
private readonly _autocomplete;
|
|
160
|
+
private readonly _elementSize;
|
|
157
161
|
constructor();
|
|
158
162
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnAutocompleteAnchor, never>;
|
|
159
163
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnAutocompleteAnchor, "[brnAutocompleteAnchor]", never, {}, {}, never, never, true, never>;
|
|
@@ -198,11 +202,6 @@ declare class BrnAutocompleteGroup {
|
|
|
198
202
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnAutocompleteGroup, "[brnAutocompleteGroup]", never, {}, {}, ["_items", "_label"], never, true, never>;
|
|
199
203
|
}
|
|
200
204
|
|
|
201
|
-
declare class BrnAutocompleteInputWrapper {
|
|
202
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnAutocompleteInputWrapper, never>;
|
|
203
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnAutocompleteInputWrapper, "[brnAutocompleteInputWrapper]", never, {}, {}, never, never, true, never>;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
205
|
declare class BrnAutocompleteLabel {
|
|
207
206
|
private static _id;
|
|
208
207
|
/** The id of the autocomplete label */
|
|
@@ -247,7 +246,7 @@ declare class BrnAutocompleteSearch<T> implements BrnAutocompleteBase<T>, Contro
|
|
|
247
246
|
readonly value: _angular_core.ModelSignal<string | null>;
|
|
248
247
|
/** The current search query. */
|
|
249
248
|
readonly search: _angular_core.ModelSignal<string>;
|
|
250
|
-
private readonly
|
|
249
|
+
private readonly _inputWidth;
|
|
251
250
|
/** @internal The width of the search input wrapper */
|
|
252
251
|
readonly searchInputWrapperWidth: _angular_core.Signal<number | null>;
|
|
253
252
|
/** @internal Access all the items within the autocomplete */
|
|
@@ -264,6 +263,7 @@ declare class BrnAutocompleteSearch<T> implements BrnAutocompleteBase<T>, Contro
|
|
|
264
263
|
readonly labelableId: _angular_core.Signal<string | undefined>;
|
|
265
264
|
constructor();
|
|
266
265
|
registerAutocompleteInput(input: BrnAutocompleteInput<T>): void;
|
|
266
|
+
updateInputWidth(width: number | null): void;
|
|
267
267
|
updateSearch(value: string): void;
|
|
268
268
|
isSelected(itemValue: T): boolean;
|
|
269
269
|
select(itemValue: T): void;
|
|
@@ -280,7 +280,7 @@ declare class BrnAutocompleteSearch<T> implements BrnAutocompleteBase<T>, Contro
|
|
|
280
280
|
setDisabledState(isDisabled: boolean): void;
|
|
281
281
|
protected _onFocusOut(event: FocusEvent): void;
|
|
282
282
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnAutocompleteSearch<any>, never>;
|
|
283
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnAutocompleteSearch<any>, "[brnAutocomplete]", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "itemToString": { "alias": "itemToString"; "required": false; "isSignal": true; }; "autoHighlight": { "alias": "autoHighlight"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "search": "searchChange"; }, ["
|
|
283
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnAutocompleteSearch<any>, "[brnAutocomplete]", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "itemToString": { "alias": "itemToString"; "required": false; "isSignal": true; }; "autoHighlight": { "alias": "autoHighlight"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "search": "searchChange"; }, ["items"], never, true, [{ directive: typeof i1.BrnFieldControl; inputs: {}; outputs: {}; }]>;
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
declare class BrnAutocompleteSeparator {
|
|
@@ -297,7 +297,7 @@ declare class BrnAutocompleteStatus {
|
|
|
297
297
|
declare const BrnAutocompleteItemToken: InjectionToken<BrnAutocompleteItem<unknown>>;
|
|
298
298
|
declare function provideBrnAutocompleteItem<T>(autocomplete: Type<BrnAutocompleteItem<T>>): ExistingProvider;
|
|
299
299
|
|
|
300
|
-
declare const BrnAutocompleteImports: readonly [typeof BrnAutocomplete, typeof BrnAutocompleteAnchor, typeof BrnAutocompleteClear, typeof BrnAutocompleteContent, typeof BrnAutocompleteEmpty, typeof BrnAutocompleteGroup, typeof BrnAutocompleteInput, typeof
|
|
300
|
+
declare const BrnAutocompleteImports: readonly [typeof BrnAutocomplete, typeof BrnAutocompleteAnchor, typeof BrnAutocompleteClear, typeof BrnAutocompleteContent, typeof BrnAutocompleteEmpty, typeof BrnAutocompleteGroup, typeof BrnAutocompleteInput, typeof BrnAutocompleteItem, typeof BrnAutocompleteLabel, typeof BrnAutocompleteList, typeof BrnAutocompleteSearch, typeof BrnAutocompleteSeparator, typeof BrnAutocompleteStatus];
|
|
301
301
|
|
|
302
|
-
export { BRN_AUTOCOMPLETE_CONTROL_VALUE_ACCESSOR, BRN_AUTOCOMPLETE_SEARCH_VALUE_ACCESSOR, BrnAutocomplete, BrnAutocompleteAnchor, BrnAutocompleteBaseToken, BrnAutocompleteClear, BrnAutocompleteContent, BrnAutocompleteEmpty, BrnAutocompleteGroup, BrnAutocompleteImports, BrnAutocompleteInput,
|
|
302
|
+
export { BRN_AUTOCOMPLETE_CONTROL_VALUE_ACCESSOR, BRN_AUTOCOMPLETE_SEARCH_VALUE_ACCESSOR, BrnAutocomplete, BrnAutocompleteAnchor, BrnAutocompleteBaseToken, BrnAutocompleteClear, BrnAutocompleteContent, BrnAutocompleteEmpty, BrnAutocompleteGroup, BrnAutocompleteImports, BrnAutocompleteInput, BrnAutocompleteItem, BrnAutocompleteItemToken, BrnAutocompleteLabel, BrnAutocompleteList, BrnAutocompleteSearch, BrnAutocompleteSeparator, BrnAutocompleteStatus, injectBrnAutocompleteBase, injectBrnAutocompleteConfig, provideBrnAutocompleteBase, provideBrnAutocompleteConfig, provideBrnAutocompleteItem };
|
|
303
303
|
export type { AutocompleteItemEqualToValue, AutocompleteItemToString, BrnAutocompleteBase, BrnAutocompleteConfig };
|
package/combobox/index.d.ts
CHANGED
|
@@ -88,6 +88,7 @@ interface BrnComboboxBase<T> {
|
|
|
88
88
|
registerComboboxInput?: (input: BrnComboboxInput<T>) => void;
|
|
89
89
|
/** Register the combobox chip input component for multi selection mode */
|
|
90
90
|
registerComboboxChipInput?: (input: BrnComboboxChipInput<T>) => void;
|
|
91
|
+
updateInputWidth: (width: number | null) => void;
|
|
91
92
|
}
|
|
92
93
|
declare const BrnComboboxBaseToken: InjectionToken<BrnComboboxBase<unknown>>;
|
|
93
94
|
declare function provideBrnComboboxBase<T>(instance: Type<BrnComboboxBase<T>>): ExistingProvider;
|
|
@@ -175,7 +176,7 @@ declare class BrnCombobox<T> implements BrnComboboxBase<T>, ControlValueAccessor
|
|
|
175
176
|
readonly hasValue: _angular_core.Signal<boolean>;
|
|
176
177
|
/** The current search query. */
|
|
177
178
|
readonly search: _angular_core.ModelSignal<string>;
|
|
178
|
-
private readonly
|
|
179
|
+
private readonly _inputWidth;
|
|
179
180
|
/** @internal The width of the search input wrapper */
|
|
180
181
|
readonly searchInputWrapperWidth: _angular_core.Signal<number | null>;
|
|
181
182
|
/** @internal Access all the items within the combobox */
|
|
@@ -194,6 +195,7 @@ declare class BrnCombobox<T> implements BrnComboboxBase<T>, ControlValueAccessor
|
|
|
194
195
|
protected _onTouched?: TouchFn;
|
|
195
196
|
constructor();
|
|
196
197
|
registerComboboxInput(input: BrnComboboxInput<T>): void;
|
|
198
|
+
updateInputWidth(width: number | null): void;
|
|
197
199
|
isSelected(itemValue: T): boolean;
|
|
198
200
|
select(itemValue: T): void;
|
|
199
201
|
/** Select the active item with Enter key. */
|
|
@@ -211,13 +213,15 @@ declare class BrnCombobox<T> implements BrnComboboxBase<T>, ControlValueAccessor
|
|
|
211
213
|
protected _onFocusOut(event: FocusEvent): void;
|
|
212
214
|
private close;
|
|
213
215
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnCombobox<any>, never>;
|
|
214
|
-
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; }; "autoHighlight": { "alias": "autoHighlight"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "search": "searchChange"; }, ["
|
|
216
|
+
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; }; "autoHighlight": { "alias": "autoHighlight"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "search": "searchChange"; }, ["items", "_content"], never, true, [{ directive: typeof i1.BrnFieldControl; inputs: {}; outputs: {}; }]>;
|
|
215
217
|
}
|
|
216
218
|
|
|
217
219
|
declare class BrnComboboxAnchor {
|
|
218
220
|
private readonly _host;
|
|
219
221
|
private readonly _brnDialog;
|
|
220
222
|
private readonly _content;
|
|
223
|
+
private readonly _combobox;
|
|
224
|
+
private readonly _elementSize;
|
|
221
225
|
constructor();
|
|
222
226
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxAnchor, never>;
|
|
223
227
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxAnchor, "[brnComboboxAnchor]", never, {}, {}, never, never, true, never>;
|
|
@@ -280,11 +284,6 @@ declare class BrnComboboxGroup {
|
|
|
280
284
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxGroup, "[brnComboboxGroup]", never, {}, {}, ["_items", "_label"], never, true, never>;
|
|
281
285
|
}
|
|
282
286
|
|
|
283
|
-
declare class BrnComboboxInputWrapper {
|
|
284
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxInputWrapper, never>;
|
|
285
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnComboboxInputWrapper, "[brnComboboxInputWrapper]", never, {}, {}, never, never, true, never>;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
287
|
declare class BrnComboboxLabel {
|
|
289
288
|
private static _id;
|
|
290
289
|
/** The id of the combobox label */
|
|
@@ -338,7 +337,7 @@ declare class BrnComboboxMultiple<T> implements BrnComboboxBase<T>, ControlValue
|
|
|
338
337
|
readonly hasValue: _angular_core.Signal<boolean>;
|
|
339
338
|
/** The current search query. */
|
|
340
339
|
readonly search: _angular_core.ModelSignal<string>;
|
|
341
|
-
private readonly
|
|
340
|
+
private readonly _inputWidth;
|
|
342
341
|
/** @internal The width of the search input wrapper */
|
|
343
342
|
readonly searchInputWrapperWidth: _angular_core.Signal<number | null>;
|
|
344
343
|
/** @internal Access all the items within the combobox */
|
|
@@ -357,6 +356,7 @@ declare class BrnComboboxMultiple<T> implements BrnComboboxBase<T>, ControlValue
|
|
|
357
356
|
protected _onTouched?: TouchFn;
|
|
358
357
|
constructor();
|
|
359
358
|
registerComboboxChipInput(input: BrnComboboxChipInput<T>): void;
|
|
359
|
+
updateInputWidth(width: number | null): void;
|
|
360
360
|
isSelected(itemValue: T): boolean;
|
|
361
361
|
select(itemValue: T): void;
|
|
362
362
|
/** Select the active item with Enter key. */
|
|
@@ -374,7 +374,7 @@ declare class BrnComboboxMultiple<T> implements BrnComboboxBase<T>, ControlValue
|
|
|
374
374
|
registerOnTouched(fn: TouchFn): void;
|
|
375
375
|
setDisabledState(isDisabled: boolean): void;
|
|
376
376
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnComboboxMultiple<any>, never>;
|
|
377
|
-
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; }; "autoHighlight": { "alias": "autoHighlight"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "search": "searchChange"; }, ["
|
|
377
|
+
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; }; "autoHighlight": { "alias": "autoHighlight"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "search": "searchChange"; }, ["items", "_content"], never, true, [{ directive: typeof i1.BrnFieldControl; inputs: {}; outputs: {}; }]>;
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
declare class BrnComboboxPlaceholder {
|
|
@@ -456,7 +456,7 @@ declare const comboboxEndsWithFilter: BrnComboboxFilter;
|
|
|
456
456
|
declare const BrnComboboxItemToken: InjectionToken<BrnComboboxItem<unknown>>;
|
|
457
457
|
declare function provideBrnComboboxItem<T>(comboboxItem: Type<BrnComboboxItem<T>>): ExistingProvider;
|
|
458
458
|
|
|
459
|
-
declare const BrnComboboxImports: readonly [typeof BrnCombobox, typeof BrnComboboxAnchor, typeof BrnComboboxChip, typeof BrnComboboxChipInput, typeof BrnComboboxChipRemove, typeof BrnComboboxClear, typeof BrnComboboxContent, typeof BrnComboboxEmpty, typeof BrnComboboxGroup, typeof
|
|
459
|
+
declare const BrnComboboxImports: readonly [typeof BrnCombobox, typeof BrnComboboxAnchor, typeof BrnComboboxChip, typeof BrnComboboxChipInput, typeof BrnComboboxChipRemove, typeof BrnComboboxClear, typeof BrnComboboxContent, typeof BrnComboboxEmpty, typeof BrnComboboxGroup, typeof BrnComboboxInput, typeof BrnComboboxItem, typeof BrnComboboxLabel, typeof BrnComboboxList, typeof BrnComboboxMultiple, typeof BrnComboboxPlaceholder, typeof BrnComboboxPopoverTrigger, typeof BrnComboboxSeparator, typeof BrnComboboxStatus, typeof BrnComboboxTrigger, typeof BrnComboboxValue, typeof BrnComboboxValueTemplate, typeof BrnComboboxValues];
|
|
460
460
|
|
|
461
|
-
export { BRN_COMBOBOX_MULTIPLE_VALUE_ACCESSOR, BRN_COMBOBOX_VALUE_ACCESSOR, BrnCombobox, BrnComboboxAnchor, BrnComboboxBaseToken, BrnComboboxChip, BrnComboboxChipInput, BrnComboboxChipRemove, BrnComboboxClear, BrnComboboxContent, BrnComboboxEmpty, BrnComboboxGroup, BrnComboboxImports, BrnComboboxInput,
|
|
461
|
+
export { BRN_COMBOBOX_MULTIPLE_VALUE_ACCESSOR, BRN_COMBOBOX_VALUE_ACCESSOR, BrnCombobox, BrnComboboxAnchor, BrnComboboxBaseToken, BrnComboboxChip, BrnComboboxChipInput, BrnComboboxChipRemove, BrnComboboxClear, BrnComboboxContent, BrnComboboxEmpty, BrnComboboxGroup, BrnComboboxImports, BrnComboboxInput, BrnComboboxItem, BrnComboboxItemToken, BrnComboboxLabel, BrnComboboxList, BrnComboboxMultiple, BrnComboboxPlaceholder, BrnComboboxPopoverTrigger, BrnComboboxSeparator, BrnComboboxStatus, BrnComboboxTrigger, BrnComboboxValue, BrnComboboxValueTemplate, BrnComboboxValues, comboboxContainsFilter, comboboxEndsWithFilter, comboboxStartsWithFilter, injectBrnComboboxBase, injectBrnComboboxConfig, provideBrnComboboxBase, provideBrnComboboxConfig, provideBrnComboboxItem };
|
|
462
462
|
export type { BrnComboboxBase, BrnComboboxConfig, BrnComboboxFilter, ComboboxFilter, ComboboxFilterOptions, ComboboxInputMode, ComboboxItemEqualToValue, ComboboxItemToString };
|
package/dialog/index.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ declare class BrnDialog<TResult = unknown, TContext extends Record<string, unkno
|
|
|
87
87
|
setAriaLabelledBy(ariaLabelledBy: string | null | undefined): void;
|
|
88
88
|
setAriaLabel(ariaLabel: string | null | undefined): void;
|
|
89
89
|
setAriaModal(ariaModal: boolean): void;
|
|
90
|
+
updatePosition(): void;
|
|
90
91
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnDialog<any, any>, never>;
|
|
91
92
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnDialog<any, any>, "[brnDialog],brn-dialog", ["brnDialog"], { "state": { "alias": "state"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; "isSignal": true; }; "positionStrategy": { "alias": "positionStrategy"; "required": false; "isSignal": true; }; "scrollStrategy": { "alias": "scrollStrategy"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; "closeOnOutsidePointerEvents": { "alias": "closeOnOutsidePointerEvents"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "attachTo": { "alias": "attachTo"; "required": false; "isSignal": true; }; "attachPositions": { "alias": "attachPositions"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "closeDelay": { "alias": "closeDelay"; "required": false; "isSignal": true; }; "disableClose": { "alias": "disableClose"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaModal": { "alias": "aria-modal"; "required": false; "isSignal": true; }; }, { "closed": "closed"; "stateChanged": "stateChanged"; }, never, never, true, never>;
|
|
92
93
|
}
|
|
@@ -156,6 +157,7 @@ declare class BrnDialogRef<DialogResult = any> {
|
|
|
156
157
|
setAriaDescribedBy(ariaDescribedBy: string | null | undefined): void;
|
|
157
158
|
setAriaLabelledBy(ariaLabelledBy: string | null | undefined): void;
|
|
158
159
|
setAriaLabel(ariaLabel: string | null | undefined): void;
|
|
160
|
+
updatePosition(): void;
|
|
159
161
|
}
|
|
160
162
|
|
|
161
163
|
declare class BrnDialogTrigger {
|
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { InjectionToken, inject, forwardRef, Injector, input, booleanAttribute, linkedSignal, model, signal, contentChildren, computed, afterNextRender, effect, untracked, Directive, ElementRef, Renderer2, TemplateRef, ViewContainerRef, contentChild, PLATFORM_ID } from '@angular/core';
|
|
4
4
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
5
|
import * as i1 from '@spartan-ng/brain/field';
|
|
6
6
|
import { BrnFieldControl, provideBrnLabelable } from '@spartan-ng/brain/field';
|
|
7
7
|
import { BrnPopover } from '@spartan-ng/brain/popover';
|
|
8
|
+
import { injectElementSize, stringifyAsLabel } from '@spartan-ng/brain/core';
|
|
8
9
|
import { BrnDialog } from '@spartan-ng/brain/dialog';
|
|
9
|
-
import { stringifyAsLabel } from '@spartan-ng/brain/core';
|
|
10
10
|
import { isPlatformBrowser } from '@angular/common';
|
|
11
11
|
|
|
12
|
-
class BrnAutocompleteInputWrapper {
|
|
13
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: BrnAutocompleteInputWrapper, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.17", type: BrnAutocompleteInputWrapper, isStandalone: true, selector: "[brnAutocompleteInputWrapper]", ngImport: i0 });
|
|
15
|
-
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: BrnAutocompleteInputWrapper, decorators: [{
|
|
17
|
-
type: Directive,
|
|
18
|
-
args: [{ selector: '[brnAutocompleteInputWrapper]' }]
|
|
19
|
-
}] });
|
|
20
|
-
|
|
21
12
|
const BrnAutocompleteItemToken = new InjectionToken('BrnAutocompleteItemToken');
|
|
22
13
|
function provideBrnAutocompleteItem(autocomplete) {
|
|
23
14
|
return { provide: BrnAutocompleteItemToken, useExisting: autocomplete };
|
|
@@ -74,16 +65,9 @@ class BrnAutocomplete {
|
|
|
74
65
|
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
75
66
|
/** The current search query. */
|
|
76
67
|
search = model('', ...(ngDevMode ? [{ debugName: "search" }] : []));
|
|
77
|
-
|
|
78
|
-
read: ElementRef,
|
|
79
|
-
}]));
|
|
68
|
+
_inputWidth = signal(null, ...(ngDevMode ? [{ debugName: "_inputWidth" }] : []));
|
|
80
69
|
/** @internal The width of the search input wrapper */
|
|
81
|
-
searchInputWrapperWidth =
|
|
82
|
-
const inputElement = this._searchInputWrapper()?.nativeElement;
|
|
83
|
-
if (!inputElement)
|
|
84
|
-
return null;
|
|
85
|
-
return inputElement.getBoundingClientRect().width || inputElement.offsetWidth;
|
|
86
|
-
}, ...(ngDevMode ? [{ debugName: "searchInputWrapperWidth" }] : []));
|
|
70
|
+
searchInputWrapperWidth = this._inputWidth.asReadonly();
|
|
87
71
|
/** @internal Access all the items within the autocomplete */
|
|
88
72
|
items = contentChildren(BrnAutocompleteItemToken, ...(ngDevMode ? [{ debugName: "items", descendants: true }] : [{
|
|
89
73
|
descendants: true,
|
|
@@ -127,6 +111,9 @@ class BrnAutocomplete {
|
|
|
127
111
|
registerAutocompleteInput(input) {
|
|
128
112
|
return this._autocompleteInput.set(input);
|
|
129
113
|
}
|
|
114
|
+
updateInputWidth(width) {
|
|
115
|
+
this._inputWidth.set(width);
|
|
116
|
+
}
|
|
130
117
|
updateSearch(value) {
|
|
131
118
|
this.search.set(value);
|
|
132
119
|
this.open();
|
|
@@ -199,7 +186,7 @@ class BrnAutocomplete {
|
|
|
199
186
|
BRN_AUTOCOMPLETE_CONTROL_VALUE_ACCESSOR,
|
|
200
187
|
provideBrnAutocompleteBase(BrnAutocomplete),
|
|
201
188
|
provideBrnLabelable(BrnAutocomplete),
|
|
202
|
-
], queries: [{ propertyName: "
|
|
189
|
+
], queries: [{ propertyName: "items", predicate: BrnAutocompleteItemToken, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.BrnFieldControl }], ngImport: i0 });
|
|
203
190
|
}
|
|
204
191
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: BrnAutocomplete, decorators: [{
|
|
205
192
|
type: Directive,
|
|
@@ -215,16 +202,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
215
202
|
'(focusout)': '_onFocusOut($event)',
|
|
216
203
|
},
|
|
217
204
|
}]
|
|
218
|
-
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], isItemEqualToValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "isItemEqualToValue", required: false }] }], itemToString: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemToString", required: false }] }], autoHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoHighlight", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }, { type: i0.Output, args: ["searchChange"] }],
|
|
219
|
-
read: ElementRef,
|
|
220
|
-
}, isSignal: true }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BrnAutocompleteItemToken), { ...{
|
|
205
|
+
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], isItemEqualToValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "isItemEqualToValue", required: false }] }], itemToString: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemToString", required: false }] }], autoHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoHighlight", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }, { type: i0.Output, args: ["searchChange"] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BrnAutocompleteItemToken), { ...{
|
|
221
206
|
descendants: true,
|
|
222
207
|
}, isSignal: true }] }] } });
|
|
223
208
|
|
|
224
209
|
class BrnAutocompleteAnchor {
|
|
225
210
|
_host = inject(ElementRef, { host: true });
|
|
226
211
|
_brnDialog = inject(BrnDialog, { optional: true });
|
|
212
|
+
_autocomplete = injectBrnAutocompleteBase();
|
|
213
|
+
_elementSize = injectElementSize();
|
|
227
214
|
constructor() {
|
|
215
|
+
effect(() => {
|
|
216
|
+
const size = this._elementSize();
|
|
217
|
+
if (size) {
|
|
218
|
+
this._autocomplete.updateInputWidth(size.width);
|
|
219
|
+
this._brnDialog?.updatePosition();
|
|
220
|
+
}
|
|
221
|
+
});
|
|
228
222
|
if (!this._brnDialog)
|
|
229
223
|
return;
|
|
230
224
|
this._brnDialog.mutableAttachTo.set(this._host.nativeElement);
|
|
@@ -565,16 +559,9 @@ class BrnAutocompleteSearch {
|
|
|
565
559
|
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
566
560
|
/** The current search query. */
|
|
567
561
|
search = model('', ...(ngDevMode ? [{ debugName: "search" }] : []));
|
|
568
|
-
|
|
569
|
-
read: ElementRef,
|
|
570
|
-
}]));
|
|
562
|
+
_inputWidth = signal(null, ...(ngDevMode ? [{ debugName: "_inputWidth" }] : []));
|
|
571
563
|
/** @internal The width of the search input wrapper */
|
|
572
|
-
searchInputWrapperWidth =
|
|
573
|
-
const inputElement = this._searchInputWrapper()?.nativeElement;
|
|
574
|
-
if (!inputElement)
|
|
575
|
-
return null;
|
|
576
|
-
return inputElement.getBoundingClientRect().width || inputElement.offsetWidth;
|
|
577
|
-
}, ...(ngDevMode ? [{ debugName: "searchInputWrapperWidth" }] : []));
|
|
564
|
+
searchInputWrapperWidth = this._inputWidth.asReadonly();
|
|
578
565
|
/** @internal Access all the items within the autocomplete */
|
|
579
566
|
items = contentChildren(BrnAutocompleteItemToken, ...(ngDevMode ? [{ debugName: "items", descendants: true }] : [{
|
|
580
567
|
descendants: true,
|
|
@@ -617,6 +604,9 @@ class BrnAutocompleteSearch {
|
|
|
617
604
|
registerAutocompleteInput(input) {
|
|
618
605
|
return this._autocompleteInput.set(input);
|
|
619
606
|
}
|
|
607
|
+
updateInputWidth(width) {
|
|
608
|
+
this._inputWidth.set(width);
|
|
609
|
+
}
|
|
620
610
|
updateSearch(value) {
|
|
621
611
|
this.value.set(value);
|
|
622
612
|
this.search.set(value);
|
|
@@ -693,7 +683,7 @@ class BrnAutocompleteSearch {
|
|
|
693
683
|
BRN_AUTOCOMPLETE_SEARCH_VALUE_ACCESSOR,
|
|
694
684
|
provideBrnAutocompleteBase(BrnAutocompleteSearch),
|
|
695
685
|
provideBrnLabelable(BrnAutocompleteSearch),
|
|
696
|
-
], queries: [{ propertyName: "
|
|
686
|
+
], queries: [{ propertyName: "items", predicate: BrnAutocompleteItemToken, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.BrnFieldControl }], ngImport: i0 });
|
|
697
687
|
}
|
|
698
688
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: BrnAutocompleteSearch, decorators: [{
|
|
699
689
|
type: Directive,
|
|
@@ -709,9 +699,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
709
699
|
'(focusout)': '_onFocusOut($event)',
|
|
710
700
|
},
|
|
711
701
|
}]
|
|
712
|
-
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], itemToString: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemToString", required: false }] }], autoHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoHighlight", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }, { type: i0.Output, args: ["searchChange"] }],
|
|
713
|
-
read: ElementRef,
|
|
714
|
-
}, isSignal: true }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BrnAutocompleteItemToken), { ...{
|
|
702
|
+
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], itemToString: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemToString", required: false }] }], autoHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoHighlight", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }, { type: i0.Output, args: ["searchChange"] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BrnAutocompleteItemToken), { ...{
|
|
715
703
|
descendants: true,
|
|
716
704
|
}, isSignal: true }] }] } });
|
|
717
705
|
|
|
@@ -756,7 +744,6 @@ const BrnAutocompleteImports = [
|
|
|
756
744
|
BrnAutocompleteEmpty,
|
|
757
745
|
BrnAutocompleteGroup,
|
|
758
746
|
BrnAutocompleteInput,
|
|
759
|
-
BrnAutocompleteInputWrapper,
|
|
760
747
|
BrnAutocompleteItem,
|
|
761
748
|
BrnAutocompleteLabel,
|
|
762
749
|
BrnAutocompleteList,
|
|
@@ -769,5 +756,5 @@ const BrnAutocompleteImports = [
|
|
|
769
756
|
* Generated bundle index. Do not edit.
|
|
770
757
|
*/
|
|
771
758
|
|
|
772
|
-
export { BRN_AUTOCOMPLETE_CONTROL_VALUE_ACCESSOR, BRN_AUTOCOMPLETE_SEARCH_VALUE_ACCESSOR, BrnAutocomplete, BrnAutocompleteAnchor, BrnAutocompleteBaseToken, BrnAutocompleteClear, BrnAutocompleteContent, BrnAutocompleteEmpty, BrnAutocompleteGroup, BrnAutocompleteImports, BrnAutocompleteInput,
|
|
759
|
+
export { BRN_AUTOCOMPLETE_CONTROL_VALUE_ACCESSOR, BRN_AUTOCOMPLETE_SEARCH_VALUE_ACCESSOR, BrnAutocomplete, BrnAutocompleteAnchor, BrnAutocompleteBaseToken, BrnAutocompleteClear, BrnAutocompleteContent, BrnAutocompleteEmpty, BrnAutocompleteGroup, BrnAutocompleteImports, BrnAutocompleteInput, BrnAutocompleteItem, BrnAutocompleteItemToken, BrnAutocompleteLabel, BrnAutocompleteList, BrnAutocompleteSearch, BrnAutocompleteSeparator, BrnAutocompleteStatus, injectBrnAutocompleteBase, injectBrnAutocompleteConfig, provideBrnAutocompleteBase, provideBrnAutocompleteConfig, provideBrnAutocompleteItem };
|
|
773
760
|
//# sourceMappingURL=spartan-ng-brain-autocomplete.mjs.map
|