igniteui-angular 13.0.0-alpha.6 → 13.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -30
- package/esm2020/lib/action-strip/grid-actions/grid-editing-actions.component.mjs +2 -2
- package/esm2020/lib/banner/banner.component.mjs +1 -1
- package/esm2020/lib/combo/combo-dropdown.component.mjs +12 -6
- package/esm2020/lib/combo/combo-item.component.mjs +5 -3
- package/esm2020/lib/combo/combo.api.mjs +3 -3
- package/esm2020/lib/combo/combo.common.mjs +1100 -2
- package/esm2020/lib/combo/combo.component.mjs +107 -1231
- package/esm2020/lib/combo/combo.directives.mjs +9 -25
- package/esm2020/lib/combo/combo.pipes.mjs +4 -6
- package/esm2020/lib/combo/public_api.mjs +5 -1
- package/esm2020/lib/core/utils.mjs +11 -1
- package/esm2020/lib/dialog/dialog.component.mjs +22 -10
- package/esm2020/lib/directives/focus-trap/focus-trap.directive.mjs +112 -0
- package/esm2020/lib/directives/for-of/for_of.directive.mjs +2 -2
- package/esm2020/lib/directives/radio/radio-group.directive.mjs +5 -13
- package/esm2020/lib/drop-down/drop-down-item.base.mjs +1 -5
- package/esm2020/lib/grids/column-actions/column-actions.component.mjs +4 -4
- package/esm2020/lib/grids/columns/column-layout.component.mjs +3 -3
- package/esm2020/lib/grids/columns/column.component.mjs +5 -5
- package/esm2020/lib/grids/common/crud.service.mjs +2 -2
- package/esm2020/lib/grids/filtering/advanced-filtering/advanced-filtering-dialog.component.mjs +2 -2
- package/esm2020/lib/grids/filtering/grid-filtering.service.mjs +9 -9
- package/esm2020/lib/grids/grid/grid.component.mjs +4 -8
- package/esm2020/lib/grids/grid-base.directive.mjs +82 -69
- package/esm2020/lib/grids/grid-public-row.mjs +3 -12
- package/esm2020/lib/grids/grouping/group-by-area.directive.mjs +2 -2
- package/esm2020/lib/grids/headers/grid-header-row.component.mjs +3 -3
- package/esm2020/lib/grids/hierarchical-grid/hierarchical-grid.component.mjs +4 -8
- package/esm2020/lib/grids/state.directive.mjs +2 -2
- package/esm2020/lib/grids/tree-grid/tree-grid.component.mjs +4 -8
- package/esm2020/lib/services/overlay/utilities.mjs +1 -1
- package/esm2020/lib/simple-combo/public_api.mjs +2 -0
- package/esm2020/lib/simple-combo/simple-combo.component.mjs +375 -0
- package/esm2020/lib/toast/toast.component.mjs +3 -6
- package/esm2020/public_api.mjs +3 -1
- package/fesm2015/igniteui-angular.mjs +1723 -1405
- package/fesm2015/igniteui-angular.mjs.map +1 -1
- package/fesm2020/igniteui-angular.mjs +1714 -1402
- package/fesm2020/igniteui-angular.mjs.map +1 -1
- package/lib/banner/banner.component.d.ts +1 -2
- package/lib/combo/combo-dropdown.component.d.ts +3 -1
- package/lib/combo/combo-item.component.d.ts +3 -1
- package/lib/combo/combo.common.d.ts +733 -4
- package/lib/combo/combo.component.d.ts +41 -799
- package/lib/combo/combo.pipes.d.ts +1 -1
- package/lib/combo/public_api.d.ts +4 -0
- package/lib/core/utils.d.ts +4 -0
- package/lib/dialog/dialog.component.d.ts +11 -2
- package/lib/directives/focus-trap/focus-trap.directive.d.ts +41 -0
- package/lib/directives/radio/radio-group.directive.d.ts +4 -4
- package/lib/grids/columns/column.component.d.ts +1 -1
- package/lib/grids/grid/grid.component.d.ts +2 -1
- package/lib/grids/grid-base.directive.d.ts +64 -8
- package/lib/grids/grid-public-row.d.ts +2 -3
- package/lib/grids/hierarchical-grid/hierarchical-grid.component.d.ts +2 -1
- package/lib/grids/tree-grid/tree-grid.component.d.ts +2 -1
- package/lib/services/overlay/utilities.d.ts +2 -1
- package/lib/simple-combo/public_api.d.ts +1 -0
- package/lib/simple-combo/simple-combo.component.d.ts +134 -0
- package/lib/toast/toast.component.d.ts +2 -0
- package/migrations/common/filterSourceDirs.d.ts +2 -2
- package/migrations/common/filterSourceDirs.js +2 -2
- package/migrations/update-13_0_0/changes/members.json +26 -0
- package/migrations/update-13_0_0/index.js +0 -31
- package/package.json +51 -43
- package/public_api.d.ts +2 -0
- package/src/lib/combo/README.md +14 -14
- package/src/lib/directives/focus-trap/README.md +17 -0
- package/src/lib/simple-combo/README.md +317 -0
- package/esm2020/lib/core/deprecateDecorators.mjs +0 -99
- package/lib/core/deprecateDecorators.d.ts +0 -20
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter, InjectionToken } from '@angular/core';
|
|
2
|
-
import {
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, InjectionToken, Injector, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { DisplayDensityBase, IDisplayDensityOptions } from '../core/displayDensity';
|
|
5
|
+
import { IgxSelectionAPIService } from '../core/selection';
|
|
6
|
+
import { CancelableBrowserEventArgs, IBaseCancelableBrowserEventArgs, IBaseEventArgs } from '../core/utils';
|
|
7
|
+
import { SortingDirection } from '../data-operations/sorting-strategy';
|
|
8
|
+
import { IForOfState, IgxForOfDirective } from '../directives/for-of/for_of.directive';
|
|
9
|
+
import { ISelectionEventArgs } from '../drop-down/public_api';
|
|
10
|
+
import { IgxIconService } from '../icon/public_api';
|
|
11
|
+
import { IgxInputGroupType } from '../input-group/inputGroupType';
|
|
12
|
+
import { IgxInputDirective, IgxInputGroupComponent } from '../input-group/public_api';
|
|
13
|
+
import { OverlaySettings } from '../services/public_api';
|
|
14
|
+
import { IgxComboDropDownComponent } from './combo-dropdown.component';
|
|
15
|
+
import { IgxComboAPIService } from './combo.api';
|
|
16
|
+
import { IComboFilteringOptions, IComboItemAdditionEvent, IComboSearchInputEventArgs, IComboSelectionChangingEventArgs } from './public_api';
|
|
17
|
+
import * as i0 from "@angular/core";
|
|
3
18
|
export declare const IGX_COMBO_COMPONENT: InjectionToken<IgxComboBase>;
|
|
4
19
|
/** @hidden @internal TODO: Evaluate */
|
|
5
20
|
export interface IgxComboBase {
|
|
@@ -25,6 +40,720 @@ export interface IgxComboBase {
|
|
|
25
40
|
isAddButtonVisible(): boolean;
|
|
26
41
|
handleInputChange(event?: string): void;
|
|
27
42
|
isItemSelected(itemID: any): boolean;
|
|
28
|
-
|
|
29
|
-
|
|
43
|
+
select(item: any): void;
|
|
44
|
+
select(itemIDs: any[], clearSelection?: boolean, event?: Event): void;
|
|
45
|
+
deselect(...args: [] | [itemIDs: any[], event?: Event]): void;
|
|
46
|
+
}
|
|
47
|
+
/** @hidden @internal */
|
|
48
|
+
export declare enum DataTypes {
|
|
49
|
+
EMPTY = "empty",
|
|
50
|
+
PRIMITIVE = "primitive",
|
|
51
|
+
COMPLEX = "complex",
|
|
52
|
+
PRIMARYKEY = "valueKey"
|
|
53
|
+
}
|
|
54
|
+
export declare enum IgxComboState {
|
|
55
|
+
/**
|
|
56
|
+
* Combo with initial state.
|
|
57
|
+
*/
|
|
58
|
+
INITIAL = 0,
|
|
59
|
+
/**
|
|
60
|
+
* Combo with valid state.
|
|
61
|
+
*/
|
|
62
|
+
VALID = 1,
|
|
63
|
+
/**
|
|
64
|
+
* Combo with invalid state.
|
|
65
|
+
*/
|
|
66
|
+
INVALID = 2
|
|
67
|
+
}
|
|
68
|
+
export declare abstract class IgxComboBaseDirective extends DisplayDensityBase implements IgxComboBase, OnInit, DoCheck, AfterViewInit, OnDestroy, ControlValueAccessor {
|
|
69
|
+
protected elementRef: ElementRef;
|
|
70
|
+
protected cdr: ChangeDetectorRef;
|
|
71
|
+
protected selectionService: IgxSelectionAPIService;
|
|
72
|
+
protected comboAPI: IgxComboAPIService;
|
|
73
|
+
protected _iconService: IgxIconService;
|
|
74
|
+
protected _displayDensityOptions: IDisplayDensityOptions;
|
|
75
|
+
protected _inputGroupType: IgxInputGroupType;
|
|
76
|
+
protected _injector: Injector;
|
|
77
|
+
/**
|
|
78
|
+
* Set custom overlay settings that control how the combo's list of items is displayed.
|
|
79
|
+
* Set:
|
|
80
|
+
* ```html
|
|
81
|
+
* <igx-combo [overlaySettings] = "customOverlaySettings"></igx-combo>
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* ```typescript
|
|
85
|
+
* const customSettings = { positionStrategy: { settings: { target: myTarget } } };
|
|
86
|
+
* combo.overlaySettings = customSettings;
|
|
87
|
+
* ```
|
|
88
|
+
* Get any custom overlay settings used by the combo:
|
|
89
|
+
* ```typescript
|
|
90
|
+
* const comboOverlaySettings: OverlaySettings = myCombo.overlaySettings;
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
overlaySettings: OverlaySettings;
|
|
94
|
+
/**
|
|
95
|
+
* Gets/gets combo id.
|
|
96
|
+
*
|
|
97
|
+
* ```typescript
|
|
98
|
+
* // get
|
|
99
|
+
* let id = this.combo.id;
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* ```html
|
|
103
|
+
* <!--set-->
|
|
104
|
+
* <igx-combo [id]='combo1'></igx-combo>
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
id: string;
|
|
108
|
+
/**
|
|
109
|
+
* Sets the style width of the element
|
|
110
|
+
*
|
|
111
|
+
* ```typescript
|
|
112
|
+
* // get
|
|
113
|
+
* let myComboWidth = this.combo.width;
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
116
|
+
* ```html
|
|
117
|
+
* <!--set-->
|
|
118
|
+
* <igx-combo [width]='250px'></igx-combo>
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
width: string;
|
|
122
|
+
/**
|
|
123
|
+
* Controls whether custom values can be added to the collection
|
|
124
|
+
*
|
|
125
|
+
* ```typescript
|
|
126
|
+
* // get
|
|
127
|
+
* let comboAllowsCustomValues = this.combo.allowCustomValues;
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* ```html
|
|
131
|
+
* <!--set-->
|
|
132
|
+
* <igx-combo [allowCustomValues]='true'></igx-combo>
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
allowCustomValues: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Configures the drop down list height
|
|
138
|
+
*
|
|
139
|
+
* ```typescript
|
|
140
|
+
* // get
|
|
141
|
+
* let myComboItemsMaxHeight = this.combo.itemsMaxHeight;
|
|
142
|
+
* ```
|
|
143
|
+
*
|
|
144
|
+
* ```html
|
|
145
|
+
* <!--set-->
|
|
146
|
+
* <igx-combo [itemsMaxHeight]='320'></igx-combo>
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
get itemsMaxHeight(): number;
|
|
150
|
+
set itemsMaxHeight(val: number);
|
|
151
|
+
/**
|
|
152
|
+
* Configures the drop down list item height
|
|
153
|
+
*
|
|
154
|
+
* ```typescript
|
|
155
|
+
* // get
|
|
156
|
+
* let myComboItemHeight = this.combo.itemHeight;
|
|
157
|
+
* ```
|
|
158
|
+
*
|
|
159
|
+
* ```html
|
|
160
|
+
* <!--set-->
|
|
161
|
+
* <igx-combo [itemHeight]='32'></igx-combo>
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
get itemHeight(): number;
|
|
165
|
+
set itemHeight(val: number);
|
|
166
|
+
/**
|
|
167
|
+
* Configures the drop down list width
|
|
168
|
+
*
|
|
169
|
+
* ```typescript
|
|
170
|
+
* // get
|
|
171
|
+
* let myComboItemsWidth = this.combo.itemsWidth;
|
|
172
|
+
* ```
|
|
173
|
+
*
|
|
174
|
+
* ```html
|
|
175
|
+
* <!--set-->
|
|
176
|
+
* <igx-combo [itemsWidth] = '"180px"'></igx-combo>
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
itemsWidth: string;
|
|
180
|
+
/**
|
|
181
|
+
* Defines the placeholder value for the combo value field
|
|
182
|
+
*
|
|
183
|
+
* ```typescript
|
|
184
|
+
* // get
|
|
185
|
+
* let myComboPlaceholder = this.combo.placeholder;
|
|
186
|
+
* ```
|
|
187
|
+
*
|
|
188
|
+
* ```html
|
|
189
|
+
* <!--set-->
|
|
190
|
+
* <igx-combo [placeholder]='newPlaceHolder'></igx-combo>
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
placeholder: string;
|
|
194
|
+
/**
|
|
195
|
+
* Combo data source.
|
|
196
|
+
*
|
|
197
|
+
* ```html
|
|
198
|
+
* <!--set-->
|
|
199
|
+
* <igx-combo [data]='items'></igx-combo>
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
|
+
get data(): any[] | null;
|
|
203
|
+
set data(val: any[] | null);
|
|
204
|
+
/**
|
|
205
|
+
* Determines which column in the data source is used to determine the value.
|
|
206
|
+
*
|
|
207
|
+
* ```typescript
|
|
208
|
+
* // get
|
|
209
|
+
* let myComboValueKey = this.combo.valueKey;
|
|
210
|
+
* ```
|
|
211
|
+
*
|
|
212
|
+
* ```html
|
|
213
|
+
* <!--set-->
|
|
214
|
+
* <igx-combo [valueKey]='myKey'></igx-combo>
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
valueKey: string;
|
|
218
|
+
set displayKey(val: string);
|
|
219
|
+
/**
|
|
220
|
+
* Determines which column in the data source is used to determine the display value.
|
|
221
|
+
*
|
|
222
|
+
* ```typescript
|
|
223
|
+
* // get
|
|
224
|
+
* let myComboDisplayKey = this.combo.displayKey;
|
|
225
|
+
*
|
|
226
|
+
* // set
|
|
227
|
+
* this.combo.displayKey = 'val';
|
|
228
|
+
*
|
|
229
|
+
* ```
|
|
230
|
+
*
|
|
231
|
+
* ```html
|
|
232
|
+
* <!--set-->
|
|
233
|
+
* <igx-combo [displayKey]='myDisplayKey'></igx-combo>
|
|
234
|
+
* ```
|
|
235
|
+
*/
|
|
236
|
+
get displayKey(): string;
|
|
237
|
+
/**
|
|
238
|
+
* The item property by which items should be grouped inside the items list. Not usable if data is not of type Object[].
|
|
239
|
+
*
|
|
240
|
+
* ```html
|
|
241
|
+
* <!--set-->
|
|
242
|
+
* <igx-combo [groupKey]='newGroupKey'></igx-combo>
|
|
243
|
+
* ```
|
|
244
|
+
*/
|
|
245
|
+
set groupKey(val: string);
|
|
246
|
+
/**
|
|
247
|
+
* The item property by which items should be grouped inside the items list. Not usable if data is not of type Object[].
|
|
248
|
+
*
|
|
249
|
+
* ```typescript
|
|
250
|
+
* // get
|
|
251
|
+
* let currentGroupKey = this.combo.groupKey;
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
254
|
+
get groupKey(): string;
|
|
255
|
+
/**
|
|
256
|
+
* An @Input property that sets groups sorting order.
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```html
|
|
260
|
+
* <igx-combo [groupSortingDirection]="groupSortingDirection"></igx-combo>
|
|
261
|
+
* ```
|
|
262
|
+
* ```typescript
|
|
263
|
+
* public groupSortingDirection = SortingDirection.Asc;
|
|
264
|
+
* ```
|
|
265
|
+
*/
|
|
266
|
+
get groupSortingDirection(): SortingDirection;
|
|
267
|
+
set groupSortingDirection(val: SortingDirection);
|
|
268
|
+
/**
|
|
269
|
+
* An @Input property that set aria-labelledby attribute
|
|
270
|
+
* ```html
|
|
271
|
+
* <igx-combo [ariaLabelledBy]="'label1'">
|
|
272
|
+
* ```
|
|
273
|
+
*/
|
|
274
|
+
ariaLabelledBy: string;
|
|
275
|
+
/** @hidden @internal */
|
|
276
|
+
cssClass: string;
|
|
277
|
+
/** @hidden @internal */
|
|
278
|
+
role: string;
|
|
279
|
+
/** @hidden @internal */
|
|
280
|
+
get ariaExpanded(): boolean;
|
|
281
|
+
/** @hidden @internal */
|
|
282
|
+
get hasPopUp(): string;
|
|
283
|
+
/** @hidden @internal */
|
|
284
|
+
get ariaOwns(): string;
|
|
285
|
+
/**
|
|
286
|
+
* An @Input property that enabled/disables combo. The default is `false`.
|
|
287
|
+
* ```html
|
|
288
|
+
* <igx-combo [disabled]="'true'">
|
|
289
|
+
* ```
|
|
290
|
+
*/
|
|
291
|
+
disabled: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* An @Input property that sets how the combo will be styled.
|
|
294
|
+
* The allowed values are `line`, `box`, `border` and `search`. The default is `box`.
|
|
295
|
+
* ```html
|
|
296
|
+
* <igx-combo [type]="'line'">
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
299
|
+
get type(): IgxInputGroupType;
|
|
300
|
+
set type(val: IgxInputGroupType);
|
|
301
|
+
/**
|
|
302
|
+
* Emitted when item selection is changing, before the selection completes
|
|
303
|
+
*
|
|
304
|
+
* ```html
|
|
305
|
+
* <igx-combo (selectionChanging)='handleSelection()'></igx-combo>
|
|
306
|
+
* ```
|
|
307
|
+
*/
|
|
308
|
+
selectionChanging: EventEmitter<ISelectionEventArgs | IComboSelectionChangingEventArgs>;
|
|
309
|
+
/**
|
|
310
|
+
* Emitted before the dropdown is opened
|
|
311
|
+
*
|
|
312
|
+
* ```html
|
|
313
|
+
* <igx-combo opening='handleOpening($event)'></igx-combo>
|
|
314
|
+
* ```
|
|
315
|
+
*/
|
|
316
|
+
opening: EventEmitter<IBaseCancelableBrowserEventArgs>;
|
|
317
|
+
/**
|
|
318
|
+
* Emitted after the dropdown is opened
|
|
319
|
+
*
|
|
320
|
+
* ```html
|
|
321
|
+
* <igx-combo (opened)='handleOpened($event)'></igx-combo>
|
|
322
|
+
* ```
|
|
323
|
+
*/
|
|
324
|
+
opened: EventEmitter<IBaseEventArgs>;
|
|
325
|
+
/**
|
|
326
|
+
* Emitted before the dropdown is closed
|
|
327
|
+
*
|
|
328
|
+
* ```html
|
|
329
|
+
* <igx-combo (closing)='handleClosing($event)'></igx-combo>
|
|
330
|
+
* ```
|
|
331
|
+
*/
|
|
332
|
+
closing: EventEmitter<IBaseCancelableBrowserEventArgs>;
|
|
333
|
+
/**
|
|
334
|
+
* Emitted after the dropdown is closed
|
|
335
|
+
*
|
|
336
|
+
* ```html
|
|
337
|
+
* <igx-combo (closed)='handleClosed($event)'></igx-combo>
|
|
338
|
+
* ```
|
|
339
|
+
*/
|
|
340
|
+
closed: EventEmitter<IBaseEventArgs>;
|
|
341
|
+
/**
|
|
342
|
+
* Emitted when an item is being added to the data collection
|
|
343
|
+
*
|
|
344
|
+
* ```html
|
|
345
|
+
* <igx-combo (addition)='handleAdditionEvent($event)'></igx-combo>
|
|
346
|
+
* ```
|
|
347
|
+
*/
|
|
348
|
+
addition: EventEmitter<IComboItemAdditionEvent>;
|
|
349
|
+
/**
|
|
350
|
+
* Emitted when the value of the search input changes (e.g. typing, pasting, clear, etc.)
|
|
351
|
+
*
|
|
352
|
+
* ```html
|
|
353
|
+
* <igx-combo (searchInputUpdate)='handleSearchInputEvent($event)'></igx-combo>
|
|
354
|
+
* ```
|
|
355
|
+
*/
|
|
356
|
+
searchInputUpdate: EventEmitter<IComboSearchInputEventArgs>;
|
|
357
|
+
/**
|
|
358
|
+
* Emitted when new chunk of data is loaded from the virtualization
|
|
359
|
+
*
|
|
360
|
+
* ```html
|
|
361
|
+
* <igx-combo (dataPreLoad)='handleDataPreloadEvent($event)'></igx-combo>
|
|
362
|
+
* ```
|
|
363
|
+
*/
|
|
364
|
+
dataPreLoad: EventEmitter<IForOfState>;
|
|
365
|
+
/**
|
|
366
|
+
* The custom template, if any, that should be used when rendering ITEMS in the combo list
|
|
367
|
+
*
|
|
368
|
+
* ```typescript
|
|
369
|
+
* // Set in typescript
|
|
370
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
371
|
+
* myComponent.combo.itemTemplate = myCustomTemplate;
|
|
372
|
+
* ```
|
|
373
|
+
* ```html
|
|
374
|
+
* <!-- Set in markup -->
|
|
375
|
+
* <igx-combo #combo>
|
|
376
|
+
* ...
|
|
377
|
+
* <ng-template igxComboItem>
|
|
378
|
+
* <div class="custom-item" let-item let-key="valueKey">
|
|
379
|
+
* <div class="custom-item__name">{{ item[key] }}</div>
|
|
380
|
+
* <div class="custom-item__cost">{{ item.cost }}</div>
|
|
381
|
+
* </div>
|
|
382
|
+
* </ng-template>
|
|
383
|
+
* </igx-combo>
|
|
384
|
+
* ```
|
|
385
|
+
*/
|
|
386
|
+
itemTemplate: TemplateRef<any>;
|
|
387
|
+
/**
|
|
388
|
+
* The custom template, if any, that should be used when rendering the HEADER for the combo items list
|
|
389
|
+
*
|
|
390
|
+
* ```typescript
|
|
391
|
+
* // Set in typescript
|
|
392
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
393
|
+
* myComponent.combo.headerTemplate = myCustomTemplate;
|
|
394
|
+
* ```
|
|
395
|
+
* ```html
|
|
396
|
+
* <!-- Set in markup -->
|
|
397
|
+
* <igx-combo #combo>
|
|
398
|
+
* ...
|
|
399
|
+
* <ng-template igxComboHeader>
|
|
400
|
+
* <div class="combo__header">
|
|
401
|
+
* This is a custom header
|
|
402
|
+
* </div>
|
|
403
|
+
* </ng-template>
|
|
404
|
+
* </igx-combo>
|
|
405
|
+
* ```
|
|
406
|
+
*/
|
|
407
|
+
headerTemplate: TemplateRef<any>;
|
|
408
|
+
/**
|
|
409
|
+
* The custom template, if any, that should be used when rendering the FOOTER for the combo items list
|
|
410
|
+
*
|
|
411
|
+
* ```typescript
|
|
412
|
+
* // Set in typescript
|
|
413
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
414
|
+
* myComponent.combo.footerTemplate = myCustomTemplate;
|
|
415
|
+
* ```
|
|
416
|
+
* ```html
|
|
417
|
+
* <!-- Set in markup -->
|
|
418
|
+
* <igx-combo #combo>
|
|
419
|
+
* ...
|
|
420
|
+
* <ng-template igxComboFooter>
|
|
421
|
+
* <div class="combo__footer">
|
|
422
|
+
* This is a custom footer
|
|
423
|
+
* </div>
|
|
424
|
+
* </ng-template>
|
|
425
|
+
* </igx-combo>
|
|
426
|
+
* ```
|
|
427
|
+
*/
|
|
428
|
+
footerTemplate: TemplateRef<any>;
|
|
429
|
+
/**
|
|
430
|
+
* The custom template, if any, that should be used when rendering HEADER ITEMS for groups in the combo list
|
|
431
|
+
*
|
|
432
|
+
* ```typescript
|
|
433
|
+
* // Set in typescript
|
|
434
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
435
|
+
* myComponent.combo.headerItemTemplate = myCustomTemplate;
|
|
436
|
+
* ```
|
|
437
|
+
* ```html
|
|
438
|
+
* <!-- Set in markup -->
|
|
439
|
+
* <igx-combo #combo>
|
|
440
|
+
* ...
|
|
441
|
+
* <ng-template igxComboHeaderItem let-item let-key="groupKey">
|
|
442
|
+
* <div class="custom-item--group">Group header for {{ item[key] }}</div>
|
|
443
|
+
* </ng-template>
|
|
444
|
+
* </igx-combo>
|
|
445
|
+
* ```
|
|
446
|
+
*/
|
|
447
|
+
headerItemTemplate: TemplateRef<any>;
|
|
448
|
+
/**
|
|
449
|
+
* The custom template, if any, that should be used when rendering the ADD BUTTON in the combo drop down
|
|
450
|
+
*
|
|
451
|
+
* ```typescript
|
|
452
|
+
* // Set in typescript
|
|
453
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
454
|
+
* myComponent.combo.addItemTemplate = myCustomTemplate;
|
|
455
|
+
* ```
|
|
456
|
+
* ```html
|
|
457
|
+
* <!-- Set in markup -->
|
|
458
|
+
* <igx-combo #combo>
|
|
459
|
+
* ...
|
|
460
|
+
* <ng-template igxComboAddItem>
|
|
461
|
+
* <button class="combo__add-button">
|
|
462
|
+
* Click to add item
|
|
463
|
+
* </button>
|
|
464
|
+
* </ng-template>
|
|
465
|
+
* </igx-combo>
|
|
466
|
+
* ```
|
|
467
|
+
*/
|
|
468
|
+
addItemTemplate: TemplateRef<any>;
|
|
469
|
+
/**
|
|
470
|
+
* The custom template, if any, that should be used when rendering the ADD BUTTON in the combo drop down
|
|
471
|
+
*
|
|
472
|
+
* ```typescript
|
|
473
|
+
* // Set in typescript
|
|
474
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
475
|
+
* myComponent.combo.emptyTemplate = myCustomTemplate;
|
|
476
|
+
* ```
|
|
477
|
+
* ```html
|
|
478
|
+
* <!-- Set in markup -->
|
|
479
|
+
* <igx-combo #combo>
|
|
480
|
+
* ...
|
|
481
|
+
* <ng-template igxComboEmpty>
|
|
482
|
+
* <div class="combo--empty">
|
|
483
|
+
* There are no items to display
|
|
484
|
+
* </div>
|
|
485
|
+
* </ng-template>
|
|
486
|
+
* </igx-combo>
|
|
487
|
+
* ```
|
|
488
|
+
*/
|
|
489
|
+
emptyTemplate: TemplateRef<any>;
|
|
490
|
+
/**
|
|
491
|
+
* The custom template, if any, that should be used when rendering the combo TOGGLE(open/close) button
|
|
492
|
+
*
|
|
493
|
+
* ```typescript
|
|
494
|
+
* // Set in typescript
|
|
495
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
496
|
+
* myComponent.combo.toggleIconTemplate = myCustomTemplate;
|
|
497
|
+
* ```
|
|
498
|
+
* ```html
|
|
499
|
+
* <!-- Set in markup -->
|
|
500
|
+
* <igx-combo #combo>
|
|
501
|
+
* ...
|
|
502
|
+
* <ng-template igxComboToggleIcon let-collapsed>
|
|
503
|
+
* <igx-icon>{{ collapsed ? 'remove_circle' : 'remove_circle_outline'}}</igx-icon>
|
|
504
|
+
* </ng-template>
|
|
505
|
+
* </igx-combo>
|
|
506
|
+
* ```
|
|
507
|
+
*/
|
|
508
|
+
toggleIconTemplate: TemplateRef<any>;
|
|
509
|
+
/**
|
|
510
|
+
* The custom template, if any, that should be used when rendering the combo CLEAR button
|
|
511
|
+
*
|
|
512
|
+
* ```typescript
|
|
513
|
+
* // Set in typescript
|
|
514
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
515
|
+
* myComponent.combo.clearIconTemplate = myCustomTemplate;
|
|
516
|
+
* ```
|
|
517
|
+
* ```html
|
|
518
|
+
* <!-- Set in markup -->
|
|
519
|
+
* <igx-combo #combo>
|
|
520
|
+
* ...
|
|
521
|
+
* <ng-template igxComboClearIcon>
|
|
522
|
+
* <igx-icon>clear</igx-icon>
|
|
523
|
+
* </ng-template>
|
|
524
|
+
* </igx-combo>
|
|
525
|
+
* ```
|
|
526
|
+
*/
|
|
527
|
+
clearIconTemplate: TemplateRef<any>;
|
|
528
|
+
/** @hidden @internal */
|
|
529
|
+
inputGroup: IgxInputGroupComponent;
|
|
530
|
+
/** @hidden @internal */
|
|
531
|
+
comboInput: IgxInputDirective;
|
|
532
|
+
/** @hidden @internal */
|
|
533
|
+
searchInput: ElementRef<HTMLInputElement>;
|
|
534
|
+
/** @hidden @internal */
|
|
535
|
+
virtualScrollContainer: IgxForOfDirective<any>;
|
|
536
|
+
protected virtDir: IgxForOfDirective<any>;
|
|
537
|
+
protected dropdownContainer: ElementRef;
|
|
538
|
+
protected primitiveTemplate: TemplateRef<any>;
|
|
539
|
+
protected complexTemplate: TemplateRef<any>;
|
|
540
|
+
/** @hidden @internal */
|
|
541
|
+
get searchValue(): string;
|
|
542
|
+
set searchValue(val: string);
|
|
543
|
+
/** @hidden @internal */
|
|
544
|
+
get isRemote(): boolean;
|
|
545
|
+
/** @hidden @internal */
|
|
546
|
+
get dataType(): string;
|
|
547
|
+
/**
|
|
548
|
+
* Gets if control is valid, when used in a form
|
|
549
|
+
*
|
|
550
|
+
* ```typescript
|
|
551
|
+
* // get
|
|
552
|
+
* let valid = this.combo.valid;
|
|
553
|
+
* ```
|
|
554
|
+
*/
|
|
555
|
+
get valid(): IgxComboState;
|
|
556
|
+
/**
|
|
557
|
+
* Sets if control is valid, when used in a form
|
|
558
|
+
*
|
|
559
|
+
* ```typescript
|
|
560
|
+
* // set
|
|
561
|
+
* this.combo.valid = IgxComboState.INVALID;
|
|
562
|
+
* ```
|
|
563
|
+
*/
|
|
564
|
+
set valid(valid: IgxComboState);
|
|
565
|
+
/**
|
|
566
|
+
* The text displayed in the combo input
|
|
567
|
+
*
|
|
568
|
+
* ```typescript
|
|
569
|
+
* // get
|
|
570
|
+
* let comboValue = this.combo.value;
|
|
571
|
+
* ```
|
|
572
|
+
*/
|
|
573
|
+
get value(): string;
|
|
574
|
+
/**
|
|
575
|
+
* Defines the current state of the virtualized data. It contains `startIndex` and `chunkSize`
|
|
576
|
+
*
|
|
577
|
+
* ```typescript
|
|
578
|
+
* // get
|
|
579
|
+
* let state = this.combo.virtualizationState;
|
|
580
|
+
* ```
|
|
581
|
+
*/
|
|
582
|
+
get virtualizationState(): IForOfState;
|
|
583
|
+
/**
|
|
584
|
+
* Sets the current state of the virtualized data.
|
|
585
|
+
*
|
|
586
|
+
* ```typescript
|
|
587
|
+
* // set
|
|
588
|
+
* this.combo.virtualizationState(state);
|
|
589
|
+
* ```
|
|
590
|
+
*/
|
|
591
|
+
set virtualizationState(state: IForOfState);
|
|
592
|
+
/**
|
|
593
|
+
* Gets drop down state.
|
|
594
|
+
*
|
|
595
|
+
* ```typescript
|
|
596
|
+
* let state = this.combo.collapsed;
|
|
597
|
+
* ```
|
|
598
|
+
*/
|
|
599
|
+
get collapsed(): boolean;
|
|
600
|
+
/**
|
|
601
|
+
* Gets total count of the virtual data items, when using remote service.
|
|
602
|
+
*
|
|
603
|
+
* ```typescript
|
|
604
|
+
* // get
|
|
605
|
+
* let count = this.combo.totalItemCount;
|
|
606
|
+
* ```
|
|
607
|
+
*/
|
|
608
|
+
get totalItemCount(): number;
|
|
609
|
+
/**
|
|
610
|
+
* Sets total count of the virtual data items, when using remote service.
|
|
611
|
+
*
|
|
612
|
+
* ```typescript
|
|
613
|
+
* // set
|
|
614
|
+
* this.combo.totalItemCount(remoteService.count);
|
|
615
|
+
* ```
|
|
616
|
+
*/
|
|
617
|
+
set totalItemCount(count: number);
|
|
618
|
+
/** @hidden @internal */
|
|
619
|
+
get template(): TemplateRef<any>;
|
|
620
|
+
/** @hidden @internal */
|
|
621
|
+
customValueFlag: boolean;
|
|
622
|
+
/** @hidden @internal */
|
|
623
|
+
filterValue: string;
|
|
624
|
+
/** @hidden @internal */
|
|
625
|
+
defaultFallbackGroup: string;
|
|
626
|
+
/** @hidden @internal */
|
|
627
|
+
filteringOptions: IComboFilteringOptions;
|
|
628
|
+
protected _data: any[];
|
|
629
|
+
protected _value: string;
|
|
630
|
+
protected _groupKey: string;
|
|
631
|
+
protected _filteredData: any[];
|
|
632
|
+
protected _displayKey: string;
|
|
633
|
+
protected _remoteSelection: {};
|
|
634
|
+
protected _valid: IgxComboState;
|
|
635
|
+
protected ngControl: NgControl;
|
|
636
|
+
protected destroy$: Subject<any>;
|
|
637
|
+
protected _onTouchedCallback: () => void;
|
|
638
|
+
protected _onChangeCallback: (_: any) => void;
|
|
639
|
+
private _type;
|
|
640
|
+
private _dataType;
|
|
641
|
+
private _searchValue;
|
|
642
|
+
private _itemHeight;
|
|
643
|
+
private _itemsMaxHeight;
|
|
644
|
+
private _overlaySettings;
|
|
645
|
+
private _groupSortingDirection;
|
|
646
|
+
abstract dropdown: IgxComboDropDownComponent;
|
|
647
|
+
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, selectionService: IgxSelectionAPIService, comboAPI: IgxComboAPIService, _iconService: IgxIconService, _displayDensityOptions: IDisplayDensityOptions, _inputGroupType: IgxInputGroupType, _injector: Injector);
|
|
648
|
+
/** @hidden @internal */
|
|
649
|
+
onArrowDown(event: Event): void;
|
|
650
|
+
/** @hidden @internal */
|
|
651
|
+
ngOnInit(): void;
|
|
652
|
+
/** @hidden @internal */
|
|
653
|
+
ngAfterViewInit(): void;
|
|
654
|
+
/** @hidden @internal */
|
|
655
|
+
ngOnDestroy(): void;
|
|
656
|
+
/**
|
|
657
|
+
* A method that opens/closes the combo.
|
|
658
|
+
*
|
|
659
|
+
* ```html
|
|
660
|
+
* <button (click)="combo.toggle()">Toggle Combo</button>
|
|
661
|
+
* <igx-combo #combo></igx-combo>
|
|
662
|
+
* ```
|
|
663
|
+
*/
|
|
664
|
+
toggle(): void;
|
|
665
|
+
/**
|
|
666
|
+
* A method that opens the combo.
|
|
667
|
+
*
|
|
668
|
+
* ```html
|
|
669
|
+
* <button (click)="combo.open()">Open Combo</button>
|
|
670
|
+
* <igx-combo #combo></igx-combo>
|
|
671
|
+
* ```
|
|
672
|
+
*/
|
|
673
|
+
open(): void;
|
|
674
|
+
/**
|
|
675
|
+
* A method that closes the combo.
|
|
676
|
+
*
|
|
677
|
+
* ```html
|
|
678
|
+
* <button (click)="combo.close()">Close Combo</button>
|
|
679
|
+
* <igx-combo #combo></igx-combo>
|
|
680
|
+
* ```
|
|
681
|
+
*/
|
|
682
|
+
close(): void;
|
|
683
|
+
/**
|
|
684
|
+
* Triggers change detection on the combo view
|
|
685
|
+
*/
|
|
686
|
+
triggerCheck(): void;
|
|
687
|
+
/**
|
|
688
|
+
* Get current selection state
|
|
689
|
+
*
|
|
690
|
+
* @returns Array of selected items
|
|
691
|
+
* ```typescript
|
|
692
|
+
* let selectedItems = this.combo.selectedItems();
|
|
693
|
+
* ```
|
|
694
|
+
*/
|
|
695
|
+
get selection(): any[];
|
|
696
|
+
/**
|
|
697
|
+
* Returns if the specified itemID is selected
|
|
698
|
+
*
|
|
699
|
+
* @hidden
|
|
700
|
+
* @internal
|
|
701
|
+
*/
|
|
702
|
+
isItemSelected(item: any): boolean;
|
|
703
|
+
/** @hidden @internal */
|
|
704
|
+
addItemToCollection(): void;
|
|
705
|
+
/** @hidden @internal */
|
|
706
|
+
isAddButtonVisible(): boolean;
|
|
707
|
+
/** @hidden @internal */
|
|
708
|
+
handleInputChange(event?: any): void;
|
|
709
|
+
/**
|
|
710
|
+
* Event handlers
|
|
711
|
+
*
|
|
712
|
+
* @hidden
|
|
713
|
+
* @internal
|
|
714
|
+
*/
|
|
715
|
+
handleOpening(e: IBaseCancelableBrowserEventArgs): void;
|
|
716
|
+
/** @hidden @internal */
|
|
717
|
+
handleClosing(e: IBaseCancelableBrowserEventArgs): void;
|
|
718
|
+
/** @hidden @internal */
|
|
719
|
+
handleClosed(): void;
|
|
720
|
+
/** @hidden @internal */
|
|
721
|
+
handleKeyDown(event: KeyboardEvent): void;
|
|
722
|
+
/** @hidden @internal */
|
|
723
|
+
registerOnChange(fn: any): void;
|
|
724
|
+
/** @hidden @internal */
|
|
725
|
+
registerOnTouched(fn: any): void;
|
|
726
|
+
/** @hidden @internal */
|
|
727
|
+
setDisabledState(isDisabled: boolean): void;
|
|
728
|
+
/** @hidden @internal */
|
|
729
|
+
onClick(event: Event): void;
|
|
730
|
+
/** @hidden @internal */
|
|
731
|
+
onBlur(): void;
|
|
732
|
+
protected onStatusChanged: () => void;
|
|
733
|
+
/** if there is a valueKey - map the keys to data items, else - just return the keys */
|
|
734
|
+
protected convertKeysToItems(keys: any[]): any[];
|
|
735
|
+
protected checkMatch(): void;
|
|
736
|
+
protected findMatch: (element: any) => boolean;
|
|
737
|
+
protected manageRequiredAsterisk(): void;
|
|
738
|
+
/** Contains key-value pairs of the selected valueKeys and their resp. displayKeys */
|
|
739
|
+
protected registerRemoteEntries(ids: any[], add?: boolean): void;
|
|
740
|
+
/**
|
|
741
|
+
* For `id: any[]` returns a mapped `{ [combo.valueKey]: any, [combo.displayKey]: any }[]`
|
|
742
|
+
*/
|
|
743
|
+
protected getValueDisplayPairs(ids: any[]): {
|
|
744
|
+
[x: string]: any;
|
|
745
|
+
}[];
|
|
746
|
+
protected getRemoteSelection(newSelection: any[], oldSelection: any[]): string;
|
|
747
|
+
abstract get filteredData(): any[] | null;
|
|
748
|
+
abstract set filteredData(val: any[] | null);
|
|
749
|
+
abstract handleOpened(): any;
|
|
750
|
+
abstract focusSearchInput(opening?: boolean): any;
|
|
751
|
+
abstract select(newItem: any): void;
|
|
752
|
+
abstract select(newItems: Array<any> | any, clearCurrentSelection?: boolean, event?: Event): void;
|
|
753
|
+
abstract deselect(...args: [] | [items: Array<any>, event?: Event]): void;
|
|
754
|
+
abstract writeValue(value: any): void;
|
|
755
|
+
protected abstract setSelection(newSelection: Set<any>, event?: Event): void;
|
|
756
|
+
protected abstract createDisplayText(newSelection: any[], oldSelection: any[]): any;
|
|
757
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IgxComboBaseDirective, [null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
758
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<IgxComboBaseDirective, never, never, { "overlaySettings": "overlaySettings"; "id": "id"; "width": "width"; "allowCustomValues": "allowCustomValues"; "itemsMaxHeight": "itemsMaxHeight"; "itemHeight": "itemHeight"; "itemsWidth": "itemsWidth"; "placeholder": "placeholder"; "data": "data"; "valueKey": "valueKey"; "displayKey": "displayKey"; "groupKey": "groupKey"; "groupSortingDirection": "groupSortingDirection"; "ariaLabelledBy": "ariaLabelledBy"; "disabled": "disabled"; "type": "type"; }, { "selectionChanging": "selectionChanging"; "opening": "opening"; "opened": "opened"; "closing": "closing"; "closed": "closed"; "addition": "addition"; "searchInputUpdate": "searchInputUpdate"; "dataPreLoad": "dataPreLoad"; }, ["itemTemplate", "headerTemplate", "footerTemplate", "headerItemTemplate", "addItemTemplate", "emptyTemplate", "toggleIconTemplate", "clearIconTemplate"]>;
|
|
30
759
|
}
|