igniteui-angular 12.2.4 → 12.3.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -11
- package/bundles/igniteui-angular.umd.js +1773 -1462
- package/bundles/igniteui-angular.umd.js.map +1 -1
- package/esm2015/igniteui-angular.js +97 -97
- package/esm2015/lib/combo/combo-dropdown.component.js +9 -4
- package/esm2015/lib/combo/combo-item.component.js +4 -3
- package/esm2015/lib/combo/combo.api.js +3 -3
- package/esm2015/lib/combo/combo.common.js +999 -2
- package/esm2015/lib/combo/combo.component.js +92 -1124
- package/esm2015/lib/combo/combo.pipes.js +3 -3
- package/esm2015/lib/data-operations/data-util.js +2 -3
- package/esm2015/lib/data-operations/grouping-strategy.js +1 -1
- package/esm2015/lib/grids/grid/grid.component.js +19 -2
- package/esm2015/lib/grids/grid/grid.pipes.js +3 -3
- package/esm2015/lib/services/exporter-common/base-export-service.js +2 -2
- package/esm2015/lib/simple-combo/public_api.js +2 -0
- package/esm2015/lib/simple-combo/simple-combo.component.js +298 -0
- package/esm2015/lib/toast/toast.component.js +46 -21
- package/esm2015/public_api.js +2 -1
- package/fesm2015/igniteui-angular.js +1305 -1025
- package/fesm2015/igniteui-angular.js.map +1 -1
- package/igniteui-angular.d.ts +96 -96
- package/igniteui-angular.metadata.json +1 -1
- package/lib/combo/combo-dropdown.component.d.ts +2 -0
- package/lib/combo/combo-item.component.d.ts +2 -0
- package/lib/combo/combo.common.d.ts +717 -4
- package/lib/combo/combo.component.d.ts +39 -782
- package/lib/combo/combo.pipes.d.ts +1 -1
- package/lib/data-operations/data-util.d.ts +2 -1
- package/lib/data-operations/grouping-strategy.d.ts +5 -2
- package/lib/grids/grid/grid.component.d.ts +17 -0
- package/lib/grids/grid/grid.pipes.d.ts +2 -1
- package/lib/simple-combo/public_api.d.ts +1 -0
- package/lib/simple-combo/simple-combo.component.d.ts +109 -0
- package/lib/toast/toast.component.d.ts +8 -4
- package/migrations/migration-collection.json +5 -0
- package/migrations/update-12_3_0/changes/members.json +26 -0
- package/migrations/update-12_3_0/index.d.ts +3 -0
- package/migrations/update-12_3_0/index.js +9 -0
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
|
@@ -2537,11 +2537,11 @@
|
|
|
2537
2537
|
};
|
|
2538
2538
|
return rec;
|
|
2539
2539
|
};
|
|
2540
|
-
DataUtil.group = function (data, state, grid, groupsRecords, fullResult) {
|
|
2540
|
+
DataUtil.group = function (data, state, grouping, grid, groupsRecords, fullResult) {
|
|
2541
|
+
if (grouping === void 0) { grouping = new IgxGrouping(); }
|
|
2541
2542
|
if (grid === void 0) { grid = null; }
|
|
2542
2543
|
if (groupsRecords === void 0) { groupsRecords = []; }
|
|
2543
2544
|
if (fullResult === void 0) { fullResult = { data: [], metadata: [] }; }
|
|
2544
|
-
var grouping = new IgxGrouping();
|
|
2545
2545
|
groupsRecords.splice(0, groupsRecords.length);
|
|
2546
2546
|
return grouping.groupBy(data, state, grid, groupsRecords, fullResult);
|
|
2547
2547
|
};
|
|
@@ -13147,7 +13147,7 @@
|
|
|
13147
13147
|
}
|
|
13148
13148
|
if (hasGrouping && !this.options.ignoreGrouping) {
|
|
13149
13149
|
var groupsRecords = [];
|
|
13150
|
-
DataUtil.group(cloneArray(gridData), groupedGridGroupingState, grid, groupsRecords);
|
|
13150
|
+
DataUtil.group(cloneArray(gridData), groupedGridGroupingState, grid.groupStrategy, grid, groupsRecords);
|
|
13151
13151
|
gridData = groupsRecords;
|
|
13152
13152
|
}
|
|
13153
13153
|
if (hasGrouping && !this.options.ignoreGrouping) {
|
|
@@ -38930,10 +38930,10 @@
|
|
|
38930
38930
|
return;
|
|
38931
38931
|
}
|
|
38932
38932
|
if (!selected) {
|
|
38933
|
-
this.combo.
|
|
38933
|
+
this.combo.select([itemID], false, event);
|
|
38934
38934
|
}
|
|
38935
38935
|
else {
|
|
38936
|
-
this.combo.
|
|
38936
|
+
this.combo.deselect([itemID], event);
|
|
38937
38937
|
}
|
|
38938
38938
|
};
|
|
38939
38939
|
IgxComboAPIService.prototype.is_item_selected = function (itemID) {
|
|
@@ -39051,7 +39051,7 @@
|
|
|
39051
39051
|
IgxComboItemComponent.decorators = [
|
|
39052
39052
|
{ type: i0.Component, args: [{
|
|
39053
39053
|
selector: 'igx-combo-item',
|
|
39054
|
-
template: "<ng-container *ngIf=\"!isHeader\">\n <igx-checkbox [checked]=\"selected\" [disableRipple]=\"true\" [disableTransitions]=\"disableTransitions\" [tabindex]=\"-1\" (click)=\"disableCheck($event)\" class=\"igx-combo__checkbox\"></igx-checkbox>\n</ng-container>\n<span class=\"igx-drop-down__inner\"><ng-content></ng-content></span>\n"
|
|
39054
|
+
template: "<ng-container *ngIf=\"!isHeader && !singleMode\">\n <igx-checkbox [checked]=\"selected\" [disableRipple]=\"true\" [disableTransitions]=\"disableTransitions\" [tabindex]=\"-1\" (click)=\"disableCheck($event)\" class=\"igx-combo__checkbox\"></igx-checkbox>\n</ng-container>\n<span class=\"igx-drop-down__inner\"><ng-content></ng-content></span>\n"
|
|
39055
39055
|
},] }
|
|
39056
39056
|
];
|
|
39057
39057
|
IgxComboItemComponent.ctorParameters = function () { return [
|
|
@@ -39061,359 +39061,25 @@
|
|
|
39061
39061
|
{ type: IgxSelectionAPIService, decorators: [{ type: i0.Inject, args: [IgxSelectionAPIService,] }] }
|
|
39062
39062
|
]; };
|
|
39063
39063
|
IgxComboItemComponent.propDecorators = {
|
|
39064
|
-
itemHeight: [{ type: i0.Input }, { type: i0.HostBinding, args: ['style.height.px',] }]
|
|
39064
|
+
itemHeight: [{ type: i0.Input }, { type: i0.HostBinding, args: ['style.height.px',] }],
|
|
39065
|
+
singleMode: [{ type: i0.Input }]
|
|
39065
39066
|
};
|
|
39066
39067
|
|
|
39067
39068
|
var IGX_COMBO_COMPONENT = new i0.InjectionToken('IgxComboComponentToken');
|
|
39068
|
-
|
|
39069
|
+
var NEXT_ID$c = 0;
|
|
39069
39070
|
/**
|
|
39070
39071
|
* @hidden
|
|
39072
|
+
* The default number of items that should be in the combo's
|
|
39073
|
+
* drop-down list if no `[itemsMaxHeight]` is specified
|
|
39071
39074
|
*/
|
|
39072
|
-
var
|
|
39073
|
-
|
|
39074
|
-
|
|
39075
|
-
|
|
39076
|
-
|
|
39077
|
-
|
|
39078
|
-
get: function () {
|
|
39079
|
-
return false;
|
|
39080
|
-
},
|
|
39081
|
-
set: function (value) {
|
|
39082
|
-
},
|
|
39083
|
-
enumerable: false,
|
|
39084
|
-
configurable: true
|
|
39085
|
-
});
|
|
39086
|
-
/**
|
|
39087
|
-
* @inheritdoc
|
|
39088
|
-
*/
|
|
39089
|
-
IgxComboAddItemComponent.prototype.clicked = function (event) {
|
|
39090
|
-
this.comboAPI.disableTransitions = false;
|
|
39091
|
-
this.comboAPI.add_custom_item();
|
|
39092
|
-
};
|
|
39093
|
-
return IgxComboAddItemComponent;
|
|
39094
|
-
}(IgxComboItemComponent));
|
|
39095
|
-
IgxComboAddItemComponent.decorators = [
|
|
39096
|
-
{ type: i0.Component, args: [{
|
|
39097
|
-
selector: 'igx-combo-add-item',
|
|
39098
|
-
template: '<ng-content></ng-content>',
|
|
39099
|
-
providers: [{ provide: IgxComboItemComponent, useExisting: IgxComboAddItemComponent }]
|
|
39100
|
-
},] }
|
|
39101
|
-
];
|
|
39102
|
-
|
|
39103
|
-
/** @hidden */
|
|
39104
|
-
var IgxComboDropDownComponent = /** @class */ (function (_super) {
|
|
39105
|
-
__extends(IgxComboDropDownComponent, _super);
|
|
39106
|
-
function IgxComboDropDownComponent(elementRef, cdr, platform, selection, combo, comboAPI, _displayDensityOptions) {
|
|
39107
|
-
var _this = _super.call(this, elementRef, cdr, platform, selection, _displayDensityOptions) || this;
|
|
39108
|
-
_this.elementRef = elementRef;
|
|
39109
|
-
_this.cdr = cdr;
|
|
39110
|
-
_this.platform = platform;
|
|
39111
|
-
_this.selection = selection;
|
|
39112
|
-
_this.combo = combo;
|
|
39113
|
-
_this.comboAPI = comboAPI;
|
|
39114
|
-
_this._displayDensityOptions = _displayDensityOptions;
|
|
39115
|
-
/**
|
|
39116
|
-
* @hidden
|
|
39117
|
-
* @internal
|
|
39118
|
-
*/
|
|
39119
|
-
_this.children = null;
|
|
39120
|
-
_this.scrollHandler = function () {
|
|
39121
|
-
_this.comboAPI.disableTransitions = true;
|
|
39122
|
-
};
|
|
39123
|
-
return _this;
|
|
39124
|
-
}
|
|
39125
|
-
Object.defineProperty(IgxComboDropDownComponent.prototype, "scrollContainer", {
|
|
39126
|
-
/** @hidden @internal */
|
|
39127
|
-
get: function () {
|
|
39128
|
-
return this.virtDir.dc.location.nativeElement;
|
|
39129
|
-
},
|
|
39130
|
-
enumerable: false,
|
|
39131
|
-
configurable: true
|
|
39132
|
-
});
|
|
39133
|
-
Object.defineProperty(IgxComboDropDownComponent.prototype, "isScrolledToLast", {
|
|
39134
|
-
get: function () {
|
|
39135
|
-
var scrollTop = this.virtDir.scrollPosition;
|
|
39136
|
-
var scrollHeight = this.virtDir.getScroll().scrollHeight;
|
|
39137
|
-
return Math.floor(scrollTop + this.virtDir.igxForContainerSize) === scrollHeight;
|
|
39138
|
-
},
|
|
39139
|
-
enumerable: false,
|
|
39140
|
-
configurable: true
|
|
39141
|
-
});
|
|
39142
|
-
Object.defineProperty(IgxComboDropDownComponent.prototype, "lastVisibleIndex", {
|
|
39143
|
-
get: function () {
|
|
39144
|
-
return this.combo.totalItemCount ?
|
|
39145
|
-
Math.floor(this.combo.itemsMaxHeight / this.combo.itemHeight) :
|
|
39146
|
-
this.items.length - 1;
|
|
39147
|
-
},
|
|
39148
|
-
enumerable: false,
|
|
39149
|
-
configurable: true
|
|
39150
|
-
});
|
|
39151
|
-
Object.defineProperty(IgxComboDropDownComponent.prototype, "sortedChildren", {
|
|
39152
|
-
get: function () {
|
|
39153
|
-
if (this.children !== undefined) {
|
|
39154
|
-
return this.children.toArray()
|
|
39155
|
-
.sort(function (a, b) { return a.index - b.index; });
|
|
39156
|
-
}
|
|
39157
|
-
return null;
|
|
39158
|
-
},
|
|
39159
|
-
enumerable: false,
|
|
39160
|
-
configurable: true
|
|
39161
|
-
});
|
|
39162
|
-
Object.defineProperty(IgxComboDropDownComponent.prototype, "items", {
|
|
39163
|
-
/**
|
|
39164
|
-
* Get all non-header items
|
|
39165
|
-
*
|
|
39166
|
-
* ```typescript
|
|
39167
|
-
* let myDropDownItems = this.dropdown.items;
|
|
39168
|
-
* ```
|
|
39169
|
-
*/
|
|
39170
|
-
get: function () {
|
|
39171
|
-
var e_1, _a;
|
|
39172
|
-
var items = [];
|
|
39173
|
-
if (this.children !== undefined) {
|
|
39174
|
-
var sortedChildren = this.sortedChildren;
|
|
39175
|
-
try {
|
|
39176
|
-
for (var sortedChildren_1 = __values(sortedChildren), sortedChildren_1_1 = sortedChildren_1.next(); !sortedChildren_1_1.done; sortedChildren_1_1 = sortedChildren_1.next()) {
|
|
39177
|
-
var child = sortedChildren_1_1.value;
|
|
39178
|
-
if (!child.isHeader) {
|
|
39179
|
-
items.push(child);
|
|
39180
|
-
}
|
|
39181
|
-
}
|
|
39182
|
-
}
|
|
39183
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
39184
|
-
finally {
|
|
39185
|
-
try {
|
|
39186
|
-
if (sortedChildren_1_1 && !sortedChildren_1_1.done && (_a = sortedChildren_1.return)) _a.call(sortedChildren_1);
|
|
39187
|
-
}
|
|
39188
|
-
finally { if (e_1) throw e_1.error; }
|
|
39189
|
-
}
|
|
39190
|
-
}
|
|
39191
|
-
return items;
|
|
39192
|
-
},
|
|
39193
|
-
enumerable: false,
|
|
39194
|
-
configurable: true
|
|
39195
|
-
});
|
|
39196
|
-
/**
|
|
39197
|
-
* @hidden @internal
|
|
39198
|
-
*/
|
|
39199
|
-
IgxComboDropDownComponent.prototype.onFocus = function () {
|
|
39200
|
-
this.focusedItem = this._focusedItem || this.items[0];
|
|
39201
|
-
};
|
|
39202
|
-
/**
|
|
39203
|
-
* @hidden @internal
|
|
39204
|
-
*/
|
|
39205
|
-
IgxComboDropDownComponent.prototype.onBlur = function (_evt) {
|
|
39206
|
-
this.focusedItem = null;
|
|
39207
|
-
};
|
|
39208
|
-
/**
|
|
39209
|
-
* @hidden @internal
|
|
39210
|
-
*/
|
|
39211
|
-
IgxComboDropDownComponent.prototype.onToggleOpened = function () {
|
|
39212
|
-
this.opened.emit();
|
|
39213
|
-
};
|
|
39214
|
-
/**
|
|
39215
|
-
* @hidden
|
|
39216
|
-
*/
|
|
39217
|
-
IgxComboDropDownComponent.prototype.navigateFirst = function () {
|
|
39218
|
-
this.navigateItem(this.virtDir.igxForOf.findIndex(function (e) { return !e.isHeader; }));
|
|
39219
|
-
};
|
|
39220
|
-
/**
|
|
39221
|
-
* @hidden
|
|
39222
|
-
*/
|
|
39223
|
-
IgxComboDropDownComponent.prototype.navigatePrev = function () {
|
|
39224
|
-
if (this._focusedItem && this._focusedItem.index === 0 && this.virtDir.state.startIndex === 0) {
|
|
39225
|
-
this.combo.focusSearchInput(false);
|
|
39226
|
-
}
|
|
39227
|
-
else {
|
|
39228
|
-
_super.prototype.navigatePrev.call(this);
|
|
39229
|
-
}
|
|
39230
|
-
};
|
|
39231
|
-
/**
|
|
39232
|
-
* @hidden
|
|
39233
|
-
*/
|
|
39234
|
-
IgxComboDropDownComponent.prototype.navigateNext = function () {
|
|
39235
|
-
var lastIndex = this.combo.totalItemCount ? this.combo.totalItemCount - 1 : this.virtDir.igxForOf.length - 1;
|
|
39236
|
-
if (this._focusedItem && this._focusedItem.index === lastIndex) {
|
|
39237
|
-
this.focusAddItemButton();
|
|
39238
|
-
}
|
|
39239
|
-
else {
|
|
39240
|
-
_super.prototype.navigateNext.call(this);
|
|
39241
|
-
}
|
|
39242
|
-
};
|
|
39243
|
-
/**
|
|
39244
|
-
* @hidden @internal
|
|
39245
|
-
*/
|
|
39246
|
-
IgxComboDropDownComponent.prototype.selectItem = function (item) {
|
|
39247
|
-
if (item === null || item === undefined) {
|
|
39248
|
-
return;
|
|
39249
|
-
}
|
|
39250
|
-
this.comboAPI.set_selected_item(item.itemID);
|
|
39251
|
-
this._focusedItem = item;
|
|
39252
|
-
};
|
|
39253
|
-
/**
|
|
39254
|
-
* @hidden @internal
|
|
39255
|
-
*/
|
|
39256
|
-
IgxComboDropDownComponent.prototype.updateScrollPosition = function () {
|
|
39257
|
-
this.virtDir.getScroll().scrollTop = this._scrollPosition;
|
|
39258
|
-
};
|
|
39259
|
-
/**
|
|
39260
|
-
* @hidden @internal
|
|
39261
|
-
*/
|
|
39262
|
-
IgxComboDropDownComponent.prototype.onItemActionKey = function (key) {
|
|
39263
|
-
switch (key) {
|
|
39264
|
-
case DropDownActionKey.ENTER:
|
|
39265
|
-
this.handleEnter();
|
|
39266
|
-
break;
|
|
39267
|
-
case DropDownActionKey.SPACE:
|
|
39268
|
-
this.handleSpace();
|
|
39269
|
-
break;
|
|
39270
|
-
case DropDownActionKey.ESCAPE:
|
|
39271
|
-
this.close();
|
|
39272
|
-
}
|
|
39273
|
-
};
|
|
39274
|
-
IgxComboDropDownComponent.prototype.ngAfterViewInit = function () {
|
|
39275
|
-
this.virtDir.getScroll().addEventListener('scroll', this.scrollHandler);
|
|
39276
|
-
};
|
|
39277
|
-
/**
|
|
39278
|
-
* @hidden @internal
|
|
39279
|
-
*/
|
|
39280
|
-
IgxComboDropDownComponent.prototype.ngOnDestroy = function () {
|
|
39281
|
-
this.virtDir.getScroll().removeEventListener('scroll', this.scrollHandler);
|
|
39282
|
-
this.destroy$.next(true);
|
|
39283
|
-
this.destroy$.complete();
|
|
39284
|
-
};
|
|
39285
|
-
IgxComboDropDownComponent.prototype.scrollToHiddenItem = function (_newItem) { };
|
|
39286
|
-
IgxComboDropDownComponent.prototype.handleEnter = function () {
|
|
39287
|
-
if (this.isAddItemFocused()) {
|
|
39288
|
-
this.combo.addItemToCollection();
|
|
39289
|
-
}
|
|
39290
|
-
else {
|
|
39291
|
-
this.close();
|
|
39292
|
-
}
|
|
39293
|
-
};
|
|
39294
|
-
IgxComboDropDownComponent.prototype.handleSpace = function () {
|
|
39295
|
-
if (this.isAddItemFocused()) {
|
|
39296
|
-
return;
|
|
39297
|
-
}
|
|
39298
|
-
else {
|
|
39299
|
-
this.selectItem(this.focusedItem);
|
|
39300
|
-
}
|
|
39301
|
-
};
|
|
39302
|
-
IgxComboDropDownComponent.prototype.isAddItemFocused = function () {
|
|
39303
|
-
return this.focusedItem instanceof IgxComboAddItemComponent;
|
|
39304
|
-
};
|
|
39305
|
-
IgxComboDropDownComponent.prototype.focusAddItemButton = function () {
|
|
39306
|
-
if (this.combo.isAddButtonVisible()) {
|
|
39307
|
-
this.focusedItem = this.items[this.items.length - 1];
|
|
39308
|
-
}
|
|
39309
|
-
};
|
|
39310
|
-
return IgxComboDropDownComponent;
|
|
39311
|
-
}(IgxDropDownComponent));
|
|
39312
|
-
IgxComboDropDownComponent.decorators = [
|
|
39313
|
-
{ type: i0.Component, args: [{
|
|
39314
|
-
selector: 'igx-combo-drop-down',
|
|
39315
|
-
template: "<div class=\"igx-drop-down__list\" [style.width]=\"width\"\nigxToggle\n(appended)=\"onToggleContentAppended($event)\"\n(opening)=\"onToggleOpening($event)\" (opened)=\"onToggleOpened()\"\n(closing)=\"onToggleClosing($event)\" (closed)=\"onToggleClosed()\">\n <div class=\"igx-drop-down__list-scroll\" #scrollContainer [attr.id]=\"this.listId\" role=\"listbox\" [attr.aria-label]=\"this.listId\"\n [style.height]=\"height\"\n [style.maxHeight]=\"maxHeight\">\n <ng-container *ngIf=\"!collapsed\">\n <ng-content></ng-content>\n </ng-container>\n </div>\n</div>\n",
|
|
39316
|
-
providers: [{ provide: IGX_DROPDOWN_BASE, useExisting: IgxComboDropDownComponent }]
|
|
39317
|
-
},] }
|
|
39318
|
-
];
|
|
39319
|
-
IgxComboDropDownComponent.ctorParameters = function () { return [
|
|
39320
|
-
{ type: i0.ElementRef },
|
|
39321
|
-
{ type: i0.ChangeDetectorRef },
|
|
39322
|
-
{ type: PlatformUtil },
|
|
39323
|
-
{ type: IgxSelectionAPIService },
|
|
39324
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [IGX_COMBO_COMPONENT,] }] },
|
|
39325
|
-
{ type: IgxComboAPIService },
|
|
39326
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [DisplayDensityToken,] }] }
|
|
39327
|
-
]; };
|
|
39328
|
-
IgxComboDropDownComponent.propDecorators = {
|
|
39329
|
-
children: [{ type: i0.ContentChildren, args: [IgxComboItemComponent, { descendants: true },] }]
|
|
39075
|
+
var itemsInContainer = 10; // TODO: make private readonly
|
|
39076
|
+
/** @hidden @internal */
|
|
39077
|
+
var ItemHeights = {
|
|
39078
|
+
comfortable: 40,
|
|
39079
|
+
cosy: 32,
|
|
39080
|
+
compact: 28,
|
|
39330
39081
|
};
|
|
39331
|
-
|
|
39332
|
-
/**
|
|
39333
|
-
* @hidden
|
|
39334
|
-
*/
|
|
39335
|
-
var IgxComboFilteringPipe = /** @class */ (function () {
|
|
39336
|
-
function IgxComboFilteringPipe() {
|
|
39337
|
-
}
|
|
39338
|
-
IgxComboFilteringPipe.prototype.transform = function (collection, searchValue, displayKey, shouldFilter, filteringOptions) {
|
|
39339
|
-
if (!collection) {
|
|
39340
|
-
return [];
|
|
39341
|
-
}
|
|
39342
|
-
if (!searchValue || !shouldFilter) {
|
|
39343
|
-
return collection;
|
|
39344
|
-
}
|
|
39345
|
-
else {
|
|
39346
|
-
var searchTerm_1 = filteringOptions.caseSensitive ? searchValue.trim() : searchValue.toLowerCase().trim();
|
|
39347
|
-
if (displayKey != null) {
|
|
39348
|
-
return collection.filter(function (e) { return filteringOptions.caseSensitive ? e[displayKey].includes(searchTerm_1) :
|
|
39349
|
-
e[displayKey].toString().toLowerCase().includes(searchTerm_1); });
|
|
39350
|
-
}
|
|
39351
|
-
else {
|
|
39352
|
-
return collection.filter(function (e) { return filteringOptions.caseSensitive ? e.includes(searchTerm_1) :
|
|
39353
|
-
e.toLowerCase().includes(searchTerm_1); });
|
|
39354
|
-
}
|
|
39355
|
-
}
|
|
39356
|
-
};
|
|
39357
|
-
return IgxComboFilteringPipe;
|
|
39358
|
-
}());
|
|
39359
|
-
IgxComboFilteringPipe.decorators = [
|
|
39360
|
-
{ type: i0.Pipe, args: [{
|
|
39361
|
-
name: 'comboFiltering'
|
|
39362
|
-
},] }
|
|
39363
|
-
];
|
|
39364
|
-
/**
|
|
39365
|
-
* @hidden
|
|
39366
|
-
*/
|
|
39367
|
-
var IgxComboGroupingPipe = /** @class */ (function () {
|
|
39368
|
-
function IgxComboGroupingPipe(combo) {
|
|
39369
|
-
this.combo = combo;
|
|
39370
|
-
}
|
|
39371
|
-
IgxComboGroupingPipe.prototype.transform = function (collection, groupKey, valueKey) {
|
|
39372
|
-
var _a;
|
|
39373
|
-
this.combo.filteredData = collection;
|
|
39374
|
-
if ((!groupKey && groupKey !== 0) || !collection.length) {
|
|
39375
|
-
return collection;
|
|
39376
|
-
}
|
|
39377
|
-
var sorted = DataUtil.sort(cloneArray(collection), [{
|
|
39378
|
-
fieldName: groupKey,
|
|
39379
|
-
dir: exports.SortingDirection.Asc,
|
|
39380
|
-
ignoreCase: true,
|
|
39381
|
-
strategy: DefaultSortingStrategy.instance()
|
|
39382
|
-
}]);
|
|
39383
|
-
var data = cloneArray(sorted);
|
|
39384
|
-
var inserts = 0;
|
|
39385
|
-
var currentHeader = null;
|
|
39386
|
-
for (var i = 0; i < sorted.length; i++) {
|
|
39387
|
-
var insertFlag = 0;
|
|
39388
|
-
if (currentHeader !== sorted[i][groupKey]) {
|
|
39389
|
-
currentHeader = sorted[i][groupKey];
|
|
39390
|
-
insertFlag = 1;
|
|
39391
|
-
}
|
|
39392
|
-
if (insertFlag) {
|
|
39393
|
-
data.splice(i + inserts, 0, (_a = {},
|
|
39394
|
-
_a[valueKey] = currentHeader,
|
|
39395
|
-
_a[groupKey] = currentHeader,
|
|
39396
|
-
_a.isHeader = true,
|
|
39397
|
-
_a));
|
|
39398
|
-
inserts++;
|
|
39399
|
-
}
|
|
39400
|
-
}
|
|
39401
|
-
return data;
|
|
39402
|
-
};
|
|
39403
|
-
return IgxComboGroupingPipe;
|
|
39404
|
-
}());
|
|
39405
|
-
IgxComboGroupingPipe.decorators = [
|
|
39406
|
-
{ type: i0.Pipe, args: [{
|
|
39407
|
-
name: 'comboGrouping'
|
|
39408
|
-
},] }
|
|
39409
|
-
];
|
|
39410
|
-
IgxComboGroupingPipe.ctorParameters = function () { return [
|
|
39411
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [IGX_COMBO_COMPONENT,] }] }
|
|
39412
|
-
]; };
|
|
39413
|
-
|
|
39414
|
-
/**
|
|
39415
|
-
* @hidden
|
|
39416
|
-
*/
|
|
39082
|
+
/** @hidden @internal */
|
|
39417
39083
|
var DataTypes;
|
|
39418
39084
|
(function (DataTypes) {
|
|
39419
39085
|
DataTypes["EMPTY"] = "empty";
|
|
@@ -39421,21 +39087,7 @@
|
|
|
39421
39087
|
DataTypes["COMPLEX"] = "complex";
|
|
39422
39088
|
DataTypes["PRIMARYKEY"] = "valueKey";
|
|
39423
39089
|
})(DataTypes || (DataTypes = {}));
|
|
39424
|
-
|
|
39425
|
-
* @hidden
|
|
39426
|
-
*/
|
|
39427
|
-
var ItemHeights = {
|
|
39428
|
-
comfortable: 40,
|
|
39429
|
-
cosy: 32,
|
|
39430
|
-
compact: 28,
|
|
39431
|
-
};
|
|
39432
|
-
/**
|
|
39433
|
-
* @hidden
|
|
39434
|
-
* The default number of items that should be in the combo's
|
|
39435
|
-
* drop-down list if no `[itemsMaxHeight]` is specified
|
|
39436
|
-
*/
|
|
39437
|
-
var itemsInContainer = 10;
|
|
39438
|
-
exports.IgxComboState = void 0;
|
|
39090
|
+
var IgxComboState;
|
|
39439
39091
|
(function (IgxComboState) {
|
|
39440
39092
|
/**
|
|
39441
39093
|
* Combo with initial state.
|
|
@@ -39449,49 +39101,14 @@
|
|
|
39449
39101
|
* Combo with invalid state.
|
|
39450
39102
|
*/
|
|
39451
39103
|
IgxComboState[IgxComboState["INVALID"] = 2] = "INVALID";
|
|
39452
|
-
})(
|
|
39453
|
-
/**
|
|
39454
|
-
|
|
39455
|
-
|
|
39456
|
-
* @hidden
|
|
39457
|
-
*/
|
|
39458
|
-
var diffInSets = function (set1, set2) {
|
|
39459
|
-
var results = [];
|
|
39460
|
-
set1.forEach(function (entry) {
|
|
39461
|
-
if (!set2.has(entry)) {
|
|
39462
|
-
results.push(entry);
|
|
39463
|
-
}
|
|
39464
|
-
});
|
|
39465
|
-
return results;
|
|
39466
|
-
};
|
|
39467
|
-
var ɵ0$1 = diffInSets;
|
|
39468
|
-
var NEXT_ID$c = 0;
|
|
39469
|
-
/**
|
|
39470
|
-
* Represents a drop-down list that provides editable functionalities, allowing users to choose an option from a predefined list.
|
|
39471
|
-
*
|
|
39472
|
-
* @igxModule IgxComboModule
|
|
39473
|
-
* @igxTheme igx-combo-theme
|
|
39474
|
-
* @igxKeywords combobox, combo selection
|
|
39475
|
-
* @igxGroup Grids & Lists
|
|
39476
|
-
*
|
|
39477
|
-
* @remarks
|
|
39478
|
-
* It provides the ability to filter items as well as perform single or multiple seleciton with the provided data.
|
|
39479
|
-
* Additionally, it exposes keyboard navigation and custom styling capabilities.
|
|
39480
|
-
* @example
|
|
39481
|
-
* ```html
|
|
39482
|
-
* <igx-combo [itemsMaxHeight]="250" [data]="locationData"
|
|
39483
|
-
* [displayKey]="'field'" [valueKey]="'field'"
|
|
39484
|
-
* placeholder="Location(s)" searchPlaceholder="Search...">
|
|
39485
|
-
* </igx-combo>
|
|
39486
|
-
* ```
|
|
39487
|
-
*/
|
|
39488
|
-
var IgxComboComponent = /** @class */ (function (_super) {
|
|
39489
|
-
__extends(IgxComboComponent, _super);
|
|
39490
|
-
function IgxComboComponent(elementRef, cdr, selection, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector) {
|
|
39104
|
+
})(IgxComboState || (IgxComboState = {}));
|
|
39105
|
+
var IgxComboBaseDirective = /** @class */ (function (_super) {
|
|
39106
|
+
__extends(IgxComboBaseDirective, _super);
|
|
39107
|
+
function IgxComboBaseDirective(elementRef, cdr, selectionService, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector) {
|
|
39491
39108
|
var _this = _super.call(this, _displayDensityOptions) || this;
|
|
39492
39109
|
_this.elementRef = elementRef;
|
|
39493
39110
|
_this.cdr = cdr;
|
|
39494
|
-
_this.
|
|
39111
|
+
_this.selectionService = selectionService;
|
|
39495
39112
|
_this.comboAPI = comboAPI;
|
|
39496
39113
|
_this._iconService = _iconService;
|
|
39497
39114
|
_this._displayDensityOptions = _displayDensityOptions;
|
|
@@ -39515,182 +39132,69 @@
|
|
|
39515
39132
|
*/
|
|
39516
39133
|
_this.overlaySettings = null;
|
|
39517
39134
|
/**
|
|
39518
|
-
*
|
|
39519
|
-
*/
|
|
39520
|
-
_this.searchInput = null;
|
|
39521
|
-
/**
|
|
39522
|
-
* The custom template, if any, that should be used when rendering ITEMS in the combo list
|
|
39135
|
+
* Gets/gets combo id.
|
|
39523
39136
|
*
|
|
39524
39137
|
* ```typescript
|
|
39525
|
-
* //
|
|
39526
|
-
*
|
|
39527
|
-
* myComponent.combo.itemTemplate = myCustomTemplate;
|
|
39138
|
+
* // get
|
|
39139
|
+
* let id = this.combo.id;
|
|
39528
39140
|
* ```
|
|
39141
|
+
*
|
|
39529
39142
|
* ```html
|
|
39530
|
-
* <!--
|
|
39531
|
-
*
|
|
39532
|
-
* ...
|
|
39533
|
-
* <ng-template igxComboItem>
|
|
39534
|
-
* <div class="custom-item" let-item let-key="valueKey">
|
|
39535
|
-
* <div class="custom-item__name">{{ item[key] }}</div>
|
|
39536
|
-
* <div class="custom-item__cost">{{ item.cost }}</div>
|
|
39537
|
-
* </div>
|
|
39538
|
-
* </ng-template>
|
|
39539
|
-
* </igx-combo>
|
|
39143
|
+
* <!--set-->
|
|
39144
|
+
* <igx-combo [id]='combo1'></igx-combo>
|
|
39540
39145
|
* ```
|
|
39541
39146
|
*/
|
|
39542
|
-
_this.
|
|
39147
|
+
_this.id = "igx-combo-" + NEXT_ID$c++;
|
|
39543
39148
|
/**
|
|
39544
|
-
*
|
|
39149
|
+
* Controls whether custom values can be added to the collection
|
|
39545
39150
|
*
|
|
39546
39151
|
* ```typescript
|
|
39547
|
-
* //
|
|
39548
|
-
*
|
|
39549
|
-
* myComponent.combo.headerTemplate = myCustomTemplate;
|
|
39152
|
+
* // get
|
|
39153
|
+
* let comboAllowsCustomValues = this.combo.allowCustomValues;
|
|
39550
39154
|
* ```
|
|
39155
|
+
*
|
|
39551
39156
|
* ```html
|
|
39552
|
-
* <!--
|
|
39553
|
-
*
|
|
39554
|
-
* ...
|
|
39555
|
-
* <ng-template igxComboHeader>
|
|
39556
|
-
* <div class="combo__header">
|
|
39557
|
-
* This is a custom header
|
|
39558
|
-
* </div>
|
|
39559
|
-
* </ng-template>
|
|
39560
|
-
* </igx-combo>
|
|
39157
|
+
* <!--set-->
|
|
39158
|
+
* <igx-combo [allowCustomValues]='true'></igx-combo>
|
|
39561
39159
|
* ```
|
|
39562
39160
|
*/
|
|
39563
|
-
_this.
|
|
39161
|
+
_this.allowCustomValues = false;
|
|
39564
39162
|
/**
|
|
39565
|
-
*
|
|
39163
|
+
* Determines which column in the data source is used to determine the value.
|
|
39566
39164
|
*
|
|
39567
39165
|
* ```typescript
|
|
39568
|
-
* //
|
|
39569
|
-
*
|
|
39570
|
-
* myComponent.combo.footerTemplate = myCustomTemplate;
|
|
39166
|
+
* // get
|
|
39167
|
+
* let myComboValueKey = this.combo.valueKey;
|
|
39571
39168
|
* ```
|
|
39169
|
+
*
|
|
39572
39170
|
* ```html
|
|
39573
|
-
* <!--
|
|
39574
|
-
*
|
|
39575
|
-
* ...
|
|
39576
|
-
* <ng-template igxComboFooter>
|
|
39577
|
-
* <div class="combo__footer">
|
|
39578
|
-
* This is a custom footer
|
|
39579
|
-
* </div>
|
|
39580
|
-
* </ng-template>
|
|
39581
|
-
* </igx-combo>
|
|
39171
|
+
* <!--set-->
|
|
39172
|
+
* <igx-combo [valueKey]='myKey'></igx-combo>
|
|
39582
39173
|
* ```
|
|
39583
39174
|
*/
|
|
39584
|
-
_this.
|
|
39175
|
+
_this.valueKey = null;
|
|
39176
|
+
/** @hidden @internal */
|
|
39177
|
+
_this.cssClass = 'igx-combo'; // Independent of display density for the time being
|
|
39178
|
+
/** @hidden @internal */
|
|
39179
|
+
_this.role = 'combobox';
|
|
39585
39180
|
/**
|
|
39586
|
-
*
|
|
39587
|
-
*
|
|
39588
|
-
* ```typescript
|
|
39589
|
-
* // Set in typescript
|
|
39590
|
-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39591
|
-
* myComponent.combo.headerItemTemplate = myCustomTemplate;
|
|
39592
|
-
* ```
|
|
39181
|
+
* An @Input property that enabled/disables combo. The default is `false`.
|
|
39593
39182
|
* ```html
|
|
39594
|
-
*
|
|
39595
|
-
* <igx-combo #combo>
|
|
39596
|
-
* ...
|
|
39597
|
-
* <ng-template igxComboHeaderItem let-item let-key="groupKey">
|
|
39598
|
-
* <div class="custom-item--group">Group header for {{ item[key] }}</div>
|
|
39599
|
-
* </ng-template>
|
|
39600
|
-
* </igx-combo>
|
|
39183
|
+
* <igx-combo [disabled]="'true'">
|
|
39601
39184
|
* ```
|
|
39602
39185
|
*/
|
|
39603
|
-
_this.
|
|
39186
|
+
_this.disabled = false;
|
|
39604
39187
|
/**
|
|
39605
|
-
*
|
|
39188
|
+
* Emitted when item selection is changing, before the selection completes
|
|
39606
39189
|
*
|
|
39607
|
-
* ```typescript
|
|
39608
|
-
* // Set in typescript
|
|
39609
|
-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39610
|
-
* myComponent.combo.addItemTemplate = myCustomTemplate;
|
|
39611
|
-
* ```
|
|
39612
39190
|
* ```html
|
|
39613
|
-
*
|
|
39614
|
-
* <igx-combo #combo>
|
|
39615
|
-
* ...
|
|
39616
|
-
* <ng-template igxComboAddItem>
|
|
39617
|
-
* <button class="combo__add-button">
|
|
39618
|
-
* Click to add item
|
|
39619
|
-
* </button>
|
|
39620
|
-
* </ng-template>
|
|
39621
|
-
* </igx-combo>
|
|
39191
|
+
* <igx-combo (selectionChanging)='handleSelection()'></igx-combo>
|
|
39622
39192
|
* ```
|
|
39623
39193
|
*/
|
|
39624
|
-
|
|
39194
|
+
// TODO: any for old/new selection?
|
|
39195
|
+
_this.selectionChanging = new i0.EventEmitter();
|
|
39625
39196
|
/**
|
|
39626
|
-
*
|
|
39627
|
-
*
|
|
39628
|
-
* ```typescript
|
|
39629
|
-
* // Set in typescript
|
|
39630
|
-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39631
|
-
* myComponent.combo.emptyTemplate = myCustomTemplate;
|
|
39632
|
-
* ```
|
|
39633
|
-
* ```html
|
|
39634
|
-
* <!-- Set in markup -->
|
|
39635
|
-
* <igx-combo #combo>
|
|
39636
|
-
* ...
|
|
39637
|
-
* <ng-template igxComboEmpty>
|
|
39638
|
-
* <div class="combo--empty">
|
|
39639
|
-
* There are no items to display
|
|
39640
|
-
* </div>
|
|
39641
|
-
* </ng-template>
|
|
39642
|
-
* </igx-combo>
|
|
39643
|
-
* ```
|
|
39644
|
-
*/
|
|
39645
|
-
_this.emptyTemplate = null;
|
|
39646
|
-
/**
|
|
39647
|
-
* The custom template, if any, that should be used when rendering the combo TOGGLE(open/close) button
|
|
39648
|
-
*
|
|
39649
|
-
* ```typescript
|
|
39650
|
-
* // Set in typescript
|
|
39651
|
-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39652
|
-
* myComponent.combo.toggleIconTemplate = myCustomTemplate;
|
|
39653
|
-
* ```
|
|
39654
|
-
* ```html
|
|
39655
|
-
* <!-- Set in markup -->
|
|
39656
|
-
* <igx-combo #combo>
|
|
39657
|
-
* ...
|
|
39658
|
-
* <ng-template igxComboToggleIcon let-collapsed>
|
|
39659
|
-
* <igx-icon>{{ collapsed ? 'remove_circle' : 'remove_circle_outline'}}</igx-icon>
|
|
39660
|
-
* </ng-template>
|
|
39661
|
-
* </igx-combo>
|
|
39662
|
-
* ```
|
|
39663
|
-
*/
|
|
39664
|
-
_this.toggleIconTemplate = null;
|
|
39665
|
-
/**
|
|
39666
|
-
* The custom template, if any, that should be used when rendering the combo CLEAR button
|
|
39667
|
-
*
|
|
39668
|
-
* ```typescript
|
|
39669
|
-
* // Set in typescript
|
|
39670
|
-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39671
|
-
* myComponent.combo.clearIconTemplate = myCustomTemplate;
|
|
39672
|
-
* ```
|
|
39673
|
-
* ```html
|
|
39674
|
-
* <!-- Set in markup -->
|
|
39675
|
-
* <igx-combo #combo>
|
|
39676
|
-
* ...
|
|
39677
|
-
* <ng-template igxComboClearIcon>
|
|
39678
|
-
* <igx-icon>clear</igx-icon>
|
|
39679
|
-
* </ng-template>
|
|
39680
|
-
* </igx-combo>
|
|
39681
|
-
* ```
|
|
39682
|
-
*/
|
|
39683
|
-
_this.clearIconTemplate = null;
|
|
39684
|
-
/**
|
|
39685
|
-
* Emitted when item selection is changing, before the selection completes
|
|
39686
|
-
*
|
|
39687
|
-
* ```html
|
|
39688
|
-
* <igx-combo (selectionChanging)='handleSelection()'></igx-combo>
|
|
39689
|
-
* ```
|
|
39690
|
-
*/
|
|
39691
|
-
_this.selectionChanging = new i0.EventEmitter();
|
|
39692
|
-
/**
|
|
39693
|
-
* Emitted before the dropdown is opened
|
|
39197
|
+
* Emitted before the dropdown is opened
|
|
39694
39198
|
*
|
|
39695
39199
|
* ```html
|
|
39696
39200
|
* <igx-combo opening='handleOpening($event)'></igx-combo>
|
|
@@ -39746,202 +39250,219 @@
|
|
|
39746
39250
|
*/
|
|
39747
39251
|
_this.dataPreLoad = new i0.EventEmitter();
|
|
39748
39252
|
/**
|
|
39749
|
-
*
|
|
39253
|
+
* The custom template, if any, that should be used when rendering ITEMS in the combo list
|
|
39750
39254
|
*
|
|
39751
39255
|
* ```typescript
|
|
39752
|
-
* //
|
|
39753
|
-
*
|
|
39256
|
+
* // Set in typescript
|
|
39257
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39258
|
+
* myComponent.combo.itemTemplate = myCustomTemplate;
|
|
39754
39259
|
* ```
|
|
39755
|
-
*
|
|
39756
39260
|
* ```html
|
|
39757
|
-
* <!--
|
|
39758
|
-
*
|
|
39261
|
+
* <!-- Set in markup -->
|
|
39262
|
+
* <igx-combo #combo>
|
|
39263
|
+
* ...
|
|
39264
|
+
* <ng-template igxComboItem>
|
|
39265
|
+
* <div class="custom-item" let-item let-key="valueKey">
|
|
39266
|
+
* <div class="custom-item__name">{{ item[key] }}</div>
|
|
39267
|
+
* <div class="custom-item__cost">{{ item.cost }}</div>
|
|
39268
|
+
* </div>
|
|
39269
|
+
* </ng-template>
|
|
39270
|
+
* </igx-combo>
|
|
39759
39271
|
* ```
|
|
39760
39272
|
*/
|
|
39761
|
-
_this.
|
|
39762
|
-
/**
|
|
39763
|
-
* @hidden @internal
|
|
39764
|
-
*/
|
|
39765
|
-
_this.cssClass = 'igx-combo'; // Independent of display density, at the time being
|
|
39766
|
-
/**
|
|
39767
|
-
* @hidden @internal
|
|
39768
|
-
*/
|
|
39769
|
-
_this.role = 'combobox';
|
|
39273
|
+
_this.itemTemplate = null;
|
|
39770
39274
|
/**
|
|
39771
|
-
*
|
|
39275
|
+
* The custom template, if any, that should be used when rendering the HEADER for the combo items list
|
|
39772
39276
|
*
|
|
39773
39277
|
* ```typescript
|
|
39774
|
-
* //
|
|
39775
|
-
*
|
|
39278
|
+
* // Set in typescript
|
|
39279
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39280
|
+
* myComponent.combo.headerTemplate = myCustomTemplate;
|
|
39776
39281
|
* ```
|
|
39777
|
-
*
|
|
39778
39282
|
* ```html
|
|
39779
|
-
* <!--
|
|
39780
|
-
*
|
|
39283
|
+
* <!-- Set in markup -->
|
|
39284
|
+
* <igx-combo #combo>
|
|
39285
|
+
* ...
|
|
39286
|
+
* <ng-template igxComboHeader>
|
|
39287
|
+
* <div class="combo__header">
|
|
39288
|
+
* This is a custom header
|
|
39289
|
+
* </div>
|
|
39290
|
+
* </ng-template>
|
|
39291
|
+
* </igx-combo>
|
|
39781
39292
|
* ```
|
|
39782
39293
|
*/
|
|
39783
|
-
_this.
|
|
39294
|
+
_this.headerTemplate = null;
|
|
39784
39295
|
/**
|
|
39785
|
-
*
|
|
39296
|
+
* The custom template, if any, that should be used when rendering the FOOTER for the combo items list
|
|
39786
39297
|
*
|
|
39787
39298
|
* ```typescript
|
|
39788
|
-
* //
|
|
39789
|
-
*
|
|
39299
|
+
* // Set in typescript
|
|
39300
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39301
|
+
* myComponent.combo.footerTemplate = myCustomTemplate;
|
|
39790
39302
|
* ```
|
|
39791
|
-
*
|
|
39792
39303
|
* ```html
|
|
39793
|
-
* <!--
|
|
39794
|
-
*
|
|
39304
|
+
* <!-- Set in markup -->
|
|
39305
|
+
* <igx-combo #combo>
|
|
39306
|
+
* ...
|
|
39307
|
+
* <ng-template igxComboFooter>
|
|
39308
|
+
* <div class="combo__footer">
|
|
39309
|
+
* This is a custom footer
|
|
39310
|
+
* </div>
|
|
39311
|
+
* </ng-template>
|
|
39312
|
+
* </igx-combo>
|
|
39795
39313
|
* ```
|
|
39796
39314
|
*/
|
|
39797
|
-
_this.
|
|
39315
|
+
_this.footerTemplate = null;
|
|
39798
39316
|
/**
|
|
39799
|
-
*
|
|
39317
|
+
* The custom template, if any, that should be used when rendering HEADER ITEMS for groups in the combo list
|
|
39800
39318
|
*
|
|
39801
39319
|
* ```typescript
|
|
39802
|
-
* //
|
|
39803
|
-
*
|
|
39320
|
+
* // Set in typescript
|
|
39321
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39322
|
+
* myComponent.combo.headerItemTemplate = myCustomTemplate;
|
|
39804
39323
|
* ```
|
|
39805
|
-
*
|
|
39806
39324
|
* ```html
|
|
39807
|
-
* <!--
|
|
39808
|
-
*
|
|
39325
|
+
* <!-- Set in markup -->
|
|
39326
|
+
* <igx-combo #combo>
|
|
39327
|
+
* ...
|
|
39328
|
+
* <ng-template igxComboHeaderItem let-item let-key="groupKey">
|
|
39329
|
+
* <div class="custom-item--group">Group header for {{ item[key] }}</div>
|
|
39330
|
+
* </ng-template>
|
|
39331
|
+
* </igx-combo>
|
|
39809
39332
|
* ```
|
|
39810
39333
|
*/
|
|
39811
|
-
_this.
|
|
39334
|
+
_this.headerItemTemplate = null;
|
|
39812
39335
|
/**
|
|
39813
|
-
*
|
|
39336
|
+
* The custom template, if any, that should be used when rendering the ADD BUTTON in the combo drop down
|
|
39814
39337
|
*
|
|
39815
39338
|
* ```typescript
|
|
39816
|
-
* //
|
|
39817
|
-
*
|
|
39339
|
+
* // Set in typescript
|
|
39340
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39341
|
+
* myComponent.combo.addItemTemplate = myCustomTemplate;
|
|
39818
39342
|
* ```
|
|
39819
|
-
*
|
|
39820
39343
|
* ```html
|
|
39821
|
-
* <!--
|
|
39822
|
-
*
|
|
39344
|
+
* <!-- Set in markup -->
|
|
39345
|
+
* <igx-combo #combo>
|
|
39346
|
+
* ...
|
|
39347
|
+
* <ng-template igxComboAddItem>
|
|
39348
|
+
* <button class="combo__add-button">
|
|
39349
|
+
* Click to add item
|
|
39350
|
+
* </button>
|
|
39351
|
+
* </ng-template>
|
|
39352
|
+
* </igx-combo>
|
|
39823
39353
|
* ```
|
|
39824
39354
|
*/
|
|
39825
|
-
_this.
|
|
39355
|
+
_this.addItemTemplate = null;
|
|
39826
39356
|
/**
|
|
39827
|
-
*
|
|
39357
|
+
* The custom template, if any, that should be used when rendering the ADD BUTTON in the combo drop down
|
|
39358
|
+
*
|
|
39359
|
+
* ```typescript
|
|
39360
|
+
* // Set in typescript
|
|
39361
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39362
|
+
* myComponent.combo.emptyTemplate = myCustomTemplate;
|
|
39363
|
+
* ```
|
|
39828
39364
|
* ```html
|
|
39829
|
-
*
|
|
39365
|
+
* <!-- Set in markup -->
|
|
39366
|
+
* <igx-combo #combo>
|
|
39367
|
+
* ...
|
|
39368
|
+
* <ng-template igxComboEmpty>
|
|
39369
|
+
* <div class="combo--empty">
|
|
39370
|
+
* There are no items to display
|
|
39371
|
+
* </div>
|
|
39372
|
+
* </ng-template>
|
|
39373
|
+
* </igx-combo>
|
|
39830
39374
|
* ```
|
|
39831
39375
|
*/
|
|
39832
|
-
_this.
|
|
39376
|
+
_this.emptyTemplate = null;
|
|
39833
39377
|
/**
|
|
39834
|
-
*
|
|
39378
|
+
* The custom template, if any, that should be used when rendering the combo TOGGLE(open/close) button
|
|
39379
|
+
*
|
|
39380
|
+
* ```typescript
|
|
39381
|
+
* // Set in typescript
|
|
39382
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39383
|
+
* myComponent.combo.toggleIconTemplate = myCustomTemplate;
|
|
39384
|
+
* ```
|
|
39835
39385
|
* ```html
|
|
39836
|
-
*
|
|
39386
|
+
* <!-- Set in markup -->
|
|
39387
|
+
* <igx-combo #combo>
|
|
39388
|
+
* ...
|
|
39389
|
+
* <ng-template igxComboToggleIcon let-collapsed>
|
|
39390
|
+
* <igx-icon>{{ collapsed ? 'remove_circle' : 'remove_circle_outline'}}</igx-icon>
|
|
39391
|
+
* </ng-template>
|
|
39392
|
+
* </igx-combo>
|
|
39837
39393
|
* ```
|
|
39838
39394
|
*/
|
|
39839
|
-
_this.
|
|
39395
|
+
_this.toggleIconTemplate = null;
|
|
39840
39396
|
/**
|
|
39841
|
-
*
|
|
39842
|
-
*
|
|
39843
|
-
*
|
|
39397
|
+
* The custom template, if any, that should be used when rendering the combo CLEAR button
|
|
39398
|
+
*
|
|
39399
|
+
* ```typescript
|
|
39400
|
+
* // Set in typescript
|
|
39401
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39402
|
+
* myComponent.combo.clearIconTemplate = myCustomTemplate;
|
|
39403
|
+
* ```
|
|
39404
|
+
* ```html
|
|
39405
|
+
* <!-- Set in markup -->
|
|
39406
|
+
* <igx-combo #combo>
|
|
39407
|
+
* ...
|
|
39408
|
+
* <ng-template igxComboClearIcon>
|
|
39409
|
+
* <igx-icon>clear</igx-icon>
|
|
39410
|
+
* </ng-template>
|
|
39411
|
+
* </igx-combo>
|
|
39412
|
+
* ```
|
|
39844
39413
|
*/
|
|
39845
|
-
_this.
|
|
39414
|
+
_this.clearIconTemplate = null;
|
|
39415
|
+
/** @hidden @internal */
|
|
39416
|
+
_this.searchInput = null;
|
|
39846
39417
|
_this.dropdownContainer = null;
|
|
39847
|
-
/**
|
|
39848
|
-
* @hidden @internal
|
|
39849
|
-
*/
|
|
39418
|
+
/** @hidden @internal */
|
|
39850
39419
|
_this.customValueFlag = true;
|
|
39851
|
-
/**
|
|
39852
|
-
|
|
39853
|
-
|
|
39420
|
+
/** @hidden @internal */
|
|
39421
|
+
_this.filterValue = '';
|
|
39422
|
+
/** @hidden @internal */
|
|
39854
39423
|
_this.defaultFallbackGroup = 'Other';
|
|
39855
|
-
/**
|
|
39856
|
-
* @hidden @internal
|
|
39857
|
-
*/
|
|
39424
|
+
/** @hidden @internal */
|
|
39858
39425
|
_this.filteringOptions = {
|
|
39859
39426
|
caseSensitive: false
|
|
39860
39427
|
};
|
|
39861
|
-
|
|
39862
|
-
|
|
39863
|
-
*/
|
|
39864
|
-
_this.filteringLogic = exports.FilteringLogic.Or;
|
|
39865
|
-
/** @hidden @internal */
|
|
39866
|
-
_this.filterValue = '';
|
|
39867
|
-
_this.stringFilters = IgxStringFilteringOperand;
|
|
39868
|
-
_this.booleanFilters = IgxBooleanFilteringOperand;
|
|
39428
|
+
_this._data = [];
|
|
39429
|
+
_this._value = '';
|
|
39869
39430
|
_this._groupKey = '';
|
|
39870
|
-
_this.
|
|
39871
|
-
_this.
|
|
39872
|
-
_this.
|
|
39873
|
-
_this._type = null;
|
|
39431
|
+
_this._filteredData = [];
|
|
39432
|
+
_this._remoteSelection = {};
|
|
39433
|
+
_this._valid = IgxComboState.INITIAL;
|
|
39874
39434
|
_this.ngControl = null;
|
|
39875
39435
|
_this.destroy$ = new rxjs.Subject();
|
|
39876
|
-
_this.
|
|
39877
|
-
_this.
|
|
39436
|
+
_this._onTouchedCallback = rxjs.noop;
|
|
39437
|
+
_this._onChangeCallback = rxjs.noop;
|
|
39438
|
+
_this._type = null;
|
|
39439
|
+
_this._dataType = '';
|
|
39440
|
+
_this._searchValue = '';
|
|
39878
39441
|
_this._itemHeight = null;
|
|
39879
39442
|
_this._itemsMaxHeight = null;
|
|
39880
|
-
_this._remoteSelection = {};
|
|
39881
|
-
_this._onChangeCallback = rxjs.noop;
|
|
39882
|
-
_this._onTouchedCallback = rxjs.noop;
|
|
39883
|
-
_this._value = '';
|
|
39884
|
-
_this._valid = exports.IgxComboState.INITIAL;
|
|
39885
39443
|
_this.onStatusChanged = function () {
|
|
39886
39444
|
if ((_this.ngControl.control.touched || _this.ngControl.control.dirty) &&
|
|
39887
39445
|
(_this.ngControl.control.validator || _this.ngControl.control.asyncValidator)) {
|
|
39888
39446
|
if (!_this.collapsed || _this.inputGroup.isFocused) {
|
|
39889
|
-
_this.valid = _this.ngControl.invalid ?
|
|
39447
|
+
_this.valid = _this.ngControl.invalid ? IgxComboState.INVALID : IgxComboState.VALID;
|
|
39890
39448
|
}
|
|
39891
39449
|
else {
|
|
39892
|
-
_this.valid = _this.ngControl.invalid ?
|
|
39450
|
+
_this.valid = _this.ngControl.invalid ? IgxComboState.INVALID : IgxComboState.INITIAL;
|
|
39893
39451
|
}
|
|
39894
39452
|
}
|
|
39895
39453
|
else {
|
|
39896
39454
|
// B.P. 18 May 2021: IgxDatePicker does not reset its state upon resetForm #9526
|
|
39897
|
-
_this.valid =
|
|
39455
|
+
_this.valid = IgxComboState.INITIAL;
|
|
39898
39456
|
}
|
|
39899
39457
|
_this.manageRequiredAsterisk();
|
|
39900
39458
|
};
|
|
39901
|
-
_this.
|
|
39459
|
+
_this.findMatch = function (element) {
|
|
39460
|
+
var value = _this.displayKey ? element[_this.displayKey] : element;
|
|
39461
|
+
return value.toString().toLowerCase() === _this.searchValue.trim().toLowerCase();
|
|
39462
|
+
};
|
|
39902
39463
|
return _this;
|
|
39903
39464
|
}
|
|
39904
|
-
Object.defineProperty(
|
|
39905
|
-
/**
|
|
39906
|
-
* @hidden @internal
|
|
39907
|
-
*/
|
|
39908
|
-
get: function () {
|
|
39909
|
-
return this.filterable || this.allowCustomValues;
|
|
39910
|
-
},
|
|
39911
|
-
enumerable: false,
|
|
39912
|
-
configurable: true
|
|
39913
|
-
});
|
|
39914
|
-
Object.defineProperty(IgxComboComponent.prototype, "ariaExpanded", {
|
|
39915
|
-
/**
|
|
39916
|
-
* @hidden @internal
|
|
39917
|
-
*/
|
|
39918
|
-
get: function () {
|
|
39919
|
-
return !this.dropdown.collapsed;
|
|
39920
|
-
},
|
|
39921
|
-
enumerable: false,
|
|
39922
|
-
configurable: true
|
|
39923
|
-
});
|
|
39924
|
-
Object.defineProperty(IgxComboComponent.prototype, "hasPopUp", {
|
|
39925
|
-
/**
|
|
39926
|
-
* @hidden @internal
|
|
39927
|
-
*/
|
|
39928
|
-
get: function () {
|
|
39929
|
-
return 'listbox';
|
|
39930
|
-
},
|
|
39931
|
-
enumerable: false,
|
|
39932
|
-
configurable: true
|
|
39933
|
-
});
|
|
39934
|
-
Object.defineProperty(IgxComboComponent.prototype, "ariaOwns", {
|
|
39935
|
-
/**
|
|
39936
|
-
* @hidden @internal
|
|
39937
|
-
*/
|
|
39938
|
-
get: function () {
|
|
39939
|
-
return this.dropdown.id;
|
|
39940
|
-
},
|
|
39941
|
-
enumerable: false,
|
|
39942
|
-
configurable: true
|
|
39943
|
-
});
|
|
39944
|
-
Object.defineProperty(IgxComboComponent.prototype, "itemsMaxHeight", {
|
|
39465
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "itemsMaxHeight", {
|
|
39945
39466
|
/**
|
|
39946
39467
|
* Configures the drop down list height
|
|
39947
39468
|
*
|
|
@@ -39967,7 +39488,7 @@
|
|
|
39967
39488
|
enumerable: false,
|
|
39968
39489
|
configurable: true
|
|
39969
39490
|
});
|
|
39970
|
-
Object.defineProperty(
|
|
39491
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "itemHeight", {
|
|
39971
39492
|
/**
|
|
39972
39493
|
* Configures the drop down list item height
|
|
39973
39494
|
*
|
|
@@ -39993,17 +39514,7 @@
|
|
|
39993
39514
|
enumerable: false,
|
|
39994
39515
|
configurable: true
|
|
39995
39516
|
});
|
|
39996
|
-
Object.defineProperty(
|
|
39997
|
-
/**
|
|
39998
|
-
* @hidden @internal
|
|
39999
|
-
*/
|
|
40000
|
-
get: function () {
|
|
40001
|
-
return !this.value && !this.placeholder;
|
|
40002
|
-
},
|
|
40003
|
-
enumerable: false,
|
|
40004
|
-
configurable: true
|
|
40005
|
-
});
|
|
40006
|
-
Object.defineProperty(IgxComboComponent.prototype, "data", {
|
|
39517
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "data", {
|
|
40007
39518
|
/**
|
|
40008
39519
|
* Combo data source.
|
|
40009
39520
|
*
|
|
@@ -40021,9 +39532,9 @@
|
|
|
40021
39532
|
enumerable: false,
|
|
40022
39533
|
configurable: true
|
|
40023
39534
|
});
|
|
40024
|
-
Object.defineProperty(
|
|
39535
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "displayKey", {
|
|
40025
39536
|
/**
|
|
40026
|
-
*
|
|
39537
|
+
* Determines which column in the data source is used to determine the display value.
|
|
40027
39538
|
*
|
|
40028
39539
|
* ```typescript
|
|
40029
39540
|
* // get
|
|
@@ -40048,7 +39559,7 @@
|
|
|
40048
39559
|
enumerable: false,
|
|
40049
39560
|
configurable: true
|
|
40050
39561
|
});
|
|
40051
|
-
Object.defineProperty(
|
|
39562
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "groupKey", {
|
|
40052
39563
|
/**
|
|
40053
39564
|
* The item property by which items should be grouped inside the items list. Not usable if data is not of type Object[].
|
|
40054
39565
|
*
|
|
@@ -40074,7 +39585,31 @@
|
|
|
40074
39585
|
enumerable: false,
|
|
40075
39586
|
configurable: true
|
|
40076
39587
|
});
|
|
40077
|
-
Object.defineProperty(
|
|
39588
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "ariaExpanded", {
|
|
39589
|
+
/** @hidden @internal */
|
|
39590
|
+
get: function () {
|
|
39591
|
+
return !this.dropdown.collapsed;
|
|
39592
|
+
},
|
|
39593
|
+
enumerable: false,
|
|
39594
|
+
configurable: true
|
|
39595
|
+
});
|
|
39596
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "hasPopUp", {
|
|
39597
|
+
/** @hidden @internal */
|
|
39598
|
+
get: function () {
|
|
39599
|
+
return 'listbox';
|
|
39600
|
+
},
|
|
39601
|
+
enumerable: false,
|
|
39602
|
+
configurable: true
|
|
39603
|
+
});
|
|
39604
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "ariaOwns", {
|
|
39605
|
+
/** @hidden @internal */
|
|
39606
|
+
get: function () {
|
|
39607
|
+
return this.dropdown.id;
|
|
39608
|
+
},
|
|
39609
|
+
enumerable: false,
|
|
39610
|
+
configurable: true
|
|
39611
|
+
});
|
|
39612
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "type", {
|
|
40078
39613
|
/**
|
|
40079
39614
|
* An @Input property that sets how the combo will be styled.
|
|
40080
39615
|
* The allowed values are `line`, `box`, `border` and `search`. The default is `box`.
|
|
@@ -40091,142 +39626,1006 @@
|
|
|
40091
39626
|
enumerable: false,
|
|
40092
39627
|
configurable: true
|
|
40093
39628
|
});
|
|
40094
|
-
Object.defineProperty(
|
|
39629
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "searchValue", {
|
|
39630
|
+
/** @hidden @internal */
|
|
39631
|
+
get: function () {
|
|
39632
|
+
return this._searchValue;
|
|
39633
|
+
},
|
|
39634
|
+
set: function (val) {
|
|
39635
|
+
this.filterValue = val;
|
|
39636
|
+
this._searchValue = val;
|
|
39637
|
+
},
|
|
39638
|
+
enumerable: false,
|
|
39639
|
+
configurable: true
|
|
39640
|
+
});
|
|
39641
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "isRemote", {
|
|
39642
|
+
/** @hidden @internal */
|
|
39643
|
+
get: function () {
|
|
39644
|
+
return this.totalItemCount > 0 &&
|
|
39645
|
+
this.valueKey &&
|
|
39646
|
+
this.dataType === DataTypes.COMPLEX;
|
|
39647
|
+
},
|
|
39648
|
+
enumerable: false,
|
|
39649
|
+
configurable: true
|
|
39650
|
+
});
|
|
39651
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "dataType", {
|
|
39652
|
+
/** @hidden @internal */
|
|
39653
|
+
get: function () {
|
|
39654
|
+
if (this.displayKey) {
|
|
39655
|
+
return DataTypes.COMPLEX;
|
|
39656
|
+
}
|
|
39657
|
+
return DataTypes.PRIMITIVE;
|
|
39658
|
+
},
|
|
39659
|
+
enumerable: false,
|
|
39660
|
+
configurable: true
|
|
39661
|
+
});
|
|
39662
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "valid", {
|
|
39663
|
+
/**
|
|
39664
|
+
* Gets if control is valid, when used in a form
|
|
39665
|
+
*
|
|
39666
|
+
* ```typescript
|
|
39667
|
+
* // get
|
|
39668
|
+
* let valid = this.combo.valid;
|
|
39669
|
+
* ```
|
|
39670
|
+
*/
|
|
39671
|
+
get: function () {
|
|
39672
|
+
return this._valid;
|
|
39673
|
+
},
|
|
39674
|
+
/**
|
|
39675
|
+
* Sets if control is valid, when used in a form
|
|
39676
|
+
*
|
|
39677
|
+
* ```typescript
|
|
39678
|
+
* // set
|
|
39679
|
+
* this.combo.valid = IgxComboState.INVALID;
|
|
39680
|
+
* ```
|
|
39681
|
+
*/
|
|
39682
|
+
set: function (valid) {
|
|
39683
|
+
this._valid = valid;
|
|
39684
|
+
this.comboInput.valid = exports.IgxInputState[IgxComboState[valid]];
|
|
39685
|
+
},
|
|
39686
|
+
enumerable: false,
|
|
39687
|
+
configurable: true
|
|
39688
|
+
});
|
|
39689
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "value", {
|
|
39690
|
+
/**
|
|
39691
|
+
* The text displayed in the combo input
|
|
39692
|
+
*
|
|
39693
|
+
* ```typescript
|
|
39694
|
+
* // get
|
|
39695
|
+
* let comboValue = this.combo.value;
|
|
39696
|
+
* ```
|
|
39697
|
+
*/
|
|
39698
|
+
get: function () {
|
|
39699
|
+
return this._value;
|
|
39700
|
+
},
|
|
39701
|
+
enumerable: false,
|
|
39702
|
+
configurable: true
|
|
39703
|
+
});
|
|
39704
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "virtualizationState", {
|
|
39705
|
+
/**
|
|
39706
|
+
* Defines the current state of the virtualized data. It contains `startIndex` and `chunkSize`
|
|
39707
|
+
*
|
|
39708
|
+
* ```typescript
|
|
39709
|
+
* // get
|
|
39710
|
+
* let state = this.combo.virtualizationState;
|
|
39711
|
+
* ```
|
|
39712
|
+
*/
|
|
39713
|
+
get: function () {
|
|
39714
|
+
return this.virtDir.state;
|
|
39715
|
+
},
|
|
39716
|
+
/**
|
|
39717
|
+
* Sets the current state of the virtualized data.
|
|
39718
|
+
*
|
|
39719
|
+
* ```typescript
|
|
39720
|
+
* // set
|
|
39721
|
+
* this.combo.virtualizationState(state);
|
|
39722
|
+
* ```
|
|
39723
|
+
*/
|
|
39724
|
+
set: function (state) {
|
|
39725
|
+
this.virtDir.state = state;
|
|
39726
|
+
},
|
|
39727
|
+
enumerable: false,
|
|
39728
|
+
configurable: true
|
|
39729
|
+
});
|
|
39730
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "collapsed", {
|
|
39731
|
+
/**
|
|
39732
|
+
* Gets drop down state.
|
|
39733
|
+
*
|
|
39734
|
+
* ```typescript
|
|
39735
|
+
* let state = this.combo.collapsed;
|
|
39736
|
+
* ```
|
|
39737
|
+
*/
|
|
39738
|
+
get: function () {
|
|
39739
|
+
return this.dropdown.collapsed;
|
|
39740
|
+
},
|
|
39741
|
+
enumerable: false,
|
|
39742
|
+
configurable: true
|
|
39743
|
+
});
|
|
39744
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "totalItemCount", {
|
|
39745
|
+
/**
|
|
39746
|
+
* Gets total count of the virtual data items, when using remote service.
|
|
39747
|
+
*
|
|
39748
|
+
* ```typescript
|
|
39749
|
+
* // get
|
|
39750
|
+
* let count = this.combo.totalItemCount;
|
|
39751
|
+
* ```
|
|
39752
|
+
*/
|
|
39753
|
+
get: function () {
|
|
39754
|
+
return this.virtDir.totalItemCount;
|
|
39755
|
+
},
|
|
39756
|
+
/**
|
|
39757
|
+
* Sets total count of the virtual data items, when using remote service.
|
|
39758
|
+
*
|
|
39759
|
+
* ```typescript
|
|
39760
|
+
* // set
|
|
39761
|
+
* this.combo.totalItemCount(remoteService.count);
|
|
39762
|
+
* ```
|
|
39763
|
+
*/
|
|
39764
|
+
set: function (count) {
|
|
39765
|
+
this.virtDir.totalItemCount = count;
|
|
39766
|
+
},
|
|
39767
|
+
enumerable: false,
|
|
39768
|
+
configurable: true
|
|
39769
|
+
});
|
|
39770
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "template", {
|
|
39771
|
+
/** @hidden @internal */
|
|
39772
|
+
get: function () {
|
|
39773
|
+
this._dataType = this.dataType;
|
|
39774
|
+
if (this.itemTemplate) {
|
|
39775
|
+
return this.itemTemplate;
|
|
39776
|
+
}
|
|
39777
|
+
if (this._dataType === DataTypes.COMPLEX) {
|
|
39778
|
+
return this.complexTemplate;
|
|
39779
|
+
}
|
|
39780
|
+
return this.primitiveTemplate;
|
|
39781
|
+
},
|
|
39782
|
+
enumerable: false,
|
|
39783
|
+
configurable: true
|
|
39784
|
+
});
|
|
39785
|
+
/** @hidden @internal */
|
|
39786
|
+
IgxComboBaseDirective.prototype.onArrowDown = function (event) {
|
|
39787
|
+
event.preventDefault();
|
|
39788
|
+
event.stopPropagation();
|
|
39789
|
+
this.open();
|
|
39790
|
+
};
|
|
39791
|
+
/** @hidden @internal */
|
|
39792
|
+
IgxComboBaseDirective.prototype.ngOnInit = function () {
|
|
39793
|
+
this.ngControl = this._injector.get(forms.NgControl, null);
|
|
39794
|
+
var targetElement = this.elementRef.nativeElement;
|
|
39795
|
+
this._overlaySettings = {
|
|
39796
|
+
target: targetElement,
|
|
39797
|
+
scrollStrategy: new AbsoluteScrollStrategy(),
|
|
39798
|
+
positionStrategy: new AutoPositionStrategy(),
|
|
39799
|
+
modal: false,
|
|
39800
|
+
closeOnOutsideClick: true,
|
|
39801
|
+
excludeFromOutsideClick: [targetElement]
|
|
39802
|
+
};
|
|
39803
|
+
this.selectionService.set(this.id, new Set());
|
|
39804
|
+
this._iconService.addSvgIconFromText(materialIconsExtended.caseSensitive.name, materialIconsExtended.caseSensitive.value, 'imx-icons');
|
|
39805
|
+
};
|
|
39806
|
+
/** @hidden @internal */
|
|
39807
|
+
IgxComboBaseDirective.prototype.ngAfterViewInit = function () {
|
|
39808
|
+
var _this = this;
|
|
39809
|
+
this.filteredData = __spreadArray([], __read(this.data));
|
|
39810
|
+
if (this.ngControl) {
|
|
39811
|
+
this.ngControl.statusChanges.pipe(operators.takeUntil(this.destroy$)).subscribe(this.onStatusChanged);
|
|
39812
|
+
this.manageRequiredAsterisk();
|
|
39813
|
+
this.cdr.detectChanges();
|
|
39814
|
+
}
|
|
39815
|
+
this.virtDir.chunkPreload.pipe(operators.takeUntil(this.destroy$)).subscribe(function (e) {
|
|
39816
|
+
var eventArgs = Object.assign({}, e, { owner: _this });
|
|
39817
|
+
_this.dataPreLoad.emit(eventArgs);
|
|
39818
|
+
});
|
|
39819
|
+
};
|
|
39820
|
+
/** @hidden @internal */
|
|
39821
|
+
IgxComboBaseDirective.prototype.ngOnDestroy = function () {
|
|
39822
|
+
this.destroy$.next();
|
|
39823
|
+
this.destroy$.complete();
|
|
39824
|
+
this.comboAPI.clear();
|
|
39825
|
+
this.selectionService.clear(this.id);
|
|
39826
|
+
};
|
|
39827
|
+
/**
|
|
39828
|
+
* A method that opens/closes the combo.
|
|
39829
|
+
*
|
|
39830
|
+
* ```html
|
|
39831
|
+
* <button (click)="combo.toggle()">Toggle Combo</button>
|
|
39832
|
+
* <igx-combo #combo></igx-combo>
|
|
39833
|
+
* ```
|
|
39834
|
+
*/
|
|
39835
|
+
IgxComboBaseDirective.prototype.toggle = function () {
|
|
39836
|
+
var overlaySettings = Object.assign({}, this._overlaySettings, this.overlaySettings);
|
|
39837
|
+
this.dropdown.toggle(overlaySettings);
|
|
39838
|
+
};
|
|
39839
|
+
/**
|
|
39840
|
+
* A method that opens the combo.
|
|
39841
|
+
*
|
|
39842
|
+
* ```html
|
|
39843
|
+
* <button (click)="combo.open()">Open Combo</button>
|
|
39844
|
+
* <igx-combo #combo></igx-combo>
|
|
39845
|
+
* ```
|
|
39846
|
+
*/
|
|
39847
|
+
IgxComboBaseDirective.prototype.open = function () {
|
|
39848
|
+
var overlaySettings = Object.assign({}, this._overlaySettings, this.overlaySettings);
|
|
39849
|
+
this.dropdown.open(overlaySettings);
|
|
39850
|
+
};
|
|
39851
|
+
/**
|
|
39852
|
+
* A method that closes the combo.
|
|
39853
|
+
*
|
|
39854
|
+
* ```html
|
|
39855
|
+
* <button (click)="combo.close()">Close Combo</button>
|
|
39856
|
+
* <igx-combo #combo></igx-combo>
|
|
39857
|
+
* ```
|
|
39858
|
+
*/
|
|
39859
|
+
IgxComboBaseDirective.prototype.close = function () {
|
|
39860
|
+
this.dropdown.close();
|
|
39861
|
+
};
|
|
39862
|
+
/**
|
|
39863
|
+
* Triggers change detection on the combo view
|
|
39864
|
+
*/
|
|
39865
|
+
IgxComboBaseDirective.prototype.triggerCheck = function () {
|
|
39866
|
+
this.cdr.detectChanges();
|
|
39867
|
+
};
|
|
39868
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "selection", {
|
|
39869
|
+
/**
|
|
39870
|
+
* Get current selection state
|
|
39871
|
+
*
|
|
39872
|
+
* @returns Array of selected items
|
|
39873
|
+
* ```typescript
|
|
39874
|
+
* let selectedItems = this.combo.selectedItems();
|
|
39875
|
+
* ```
|
|
39876
|
+
*/
|
|
39877
|
+
get: function () {
|
|
39878
|
+
var items = Array.from(this.selectionService.get(this.id));
|
|
39879
|
+
return items;
|
|
39880
|
+
},
|
|
39881
|
+
enumerable: false,
|
|
39882
|
+
configurable: true
|
|
39883
|
+
});
|
|
39884
|
+
/**
|
|
39885
|
+
* Returns if the specified itemID is selected
|
|
39886
|
+
*
|
|
39887
|
+
* @hidden
|
|
39888
|
+
* @internal
|
|
39889
|
+
*/
|
|
39890
|
+
IgxComboBaseDirective.prototype.isItemSelected = function (item) {
|
|
39891
|
+
return this.selectionService.is_item_selected(this.id, item);
|
|
39892
|
+
};
|
|
39893
|
+
/** @hidden @internal */
|
|
39894
|
+
IgxComboBaseDirective.prototype.addItemToCollection = function () {
|
|
39895
|
+
var _b, _c;
|
|
39896
|
+
var _a;
|
|
39897
|
+
if (!this.searchValue) {
|
|
39898
|
+
return;
|
|
39899
|
+
}
|
|
39900
|
+
var newValue = this.searchValue.trim();
|
|
39901
|
+
var addedItem = this.displayKey ? (_b = {},
|
|
39902
|
+
_b[this.valueKey] = newValue,
|
|
39903
|
+
_b[this.displayKey] = newValue,
|
|
39904
|
+
_b) : newValue;
|
|
39905
|
+
if (this.groupKey) {
|
|
39906
|
+
Object.assign(addedItem, (_c = {}, _c[this.groupKey] = this.defaultFallbackGroup, _c));
|
|
39907
|
+
}
|
|
39908
|
+
// expose shallow copy instead of this.data in event args so this.data can't be mutated
|
|
39909
|
+
var oldCollection = __spreadArray([], __read(this.data));
|
|
39910
|
+
var newCollection = __spreadArray(__spreadArray([], __read(this.data)), [addedItem]);
|
|
39911
|
+
var args = {
|
|
39912
|
+
oldCollection: oldCollection,
|
|
39913
|
+
addedItem: addedItem,
|
|
39914
|
+
newCollection: newCollection,
|
|
39915
|
+
owner: this, cancel: false
|
|
39916
|
+
};
|
|
39917
|
+
this.addition.emit(args);
|
|
39918
|
+
if (args.cancel) {
|
|
39919
|
+
return;
|
|
39920
|
+
}
|
|
39921
|
+
this.data.push(args.addedItem);
|
|
39922
|
+
// trigger re-render
|
|
39923
|
+
this.data = cloneArray(this.data);
|
|
39924
|
+
this.select(this.valueKey !== null && this.valueKey !== undefined ?
|
|
39925
|
+
[args.addedItem[this.valueKey]] : [args.addedItem], false);
|
|
39926
|
+
this.customValueFlag = false;
|
|
39927
|
+
(_a = this.searchInput) === null || _a === void 0 ? void 0 : _a.nativeElement.focus();
|
|
39928
|
+
this.dropdown.focusedItem = null;
|
|
39929
|
+
this.virtDir.scrollTo(0);
|
|
39930
|
+
};
|
|
39931
|
+
/** @hidden @internal */
|
|
39932
|
+
IgxComboBaseDirective.prototype.isAddButtonVisible = function () {
|
|
39933
|
+
// This should always return a boolean value. If this.searchValue was '', it returns '' instead of false;
|
|
39934
|
+
return this.searchValue !== '' && this.customValueFlag;
|
|
39935
|
+
};
|
|
39936
|
+
/** @hidden @internal */
|
|
39937
|
+
IgxComboBaseDirective.prototype.handleInputChange = function (event) {
|
|
39938
|
+
if (event !== undefined) {
|
|
39939
|
+
var args = {
|
|
39940
|
+
searchText: typeof event === 'string' ? event : event.target.value,
|
|
39941
|
+
owner: this,
|
|
39942
|
+
cancel: false
|
|
39943
|
+
};
|
|
39944
|
+
this.searchInputUpdate.emit(args);
|
|
39945
|
+
if (args.cancel) {
|
|
39946
|
+
this.filterValue = null;
|
|
39947
|
+
}
|
|
39948
|
+
}
|
|
39949
|
+
this.checkMatch();
|
|
39950
|
+
};
|
|
39951
|
+
/**
|
|
39952
|
+
* Event handlers
|
|
39953
|
+
*
|
|
39954
|
+
* @hidden
|
|
39955
|
+
* @internal
|
|
39956
|
+
*/
|
|
39957
|
+
IgxComboBaseDirective.prototype.handleOpening = function (e) {
|
|
39958
|
+
var args = { owner: this, event: e.event, cancel: e.cancel };
|
|
39959
|
+
this.opening.emit(args);
|
|
39960
|
+
e.cancel = args.cancel;
|
|
39961
|
+
};
|
|
39962
|
+
/** @hidden @internal */
|
|
39963
|
+
IgxComboBaseDirective.prototype.handleClosing = function (e) {
|
|
39964
|
+
var _a;
|
|
39965
|
+
var args = { owner: this, event: e.event, cancel: e.cancel };
|
|
39966
|
+
this.closing.emit(args);
|
|
39967
|
+
e.cancel = args.cancel;
|
|
39968
|
+
if (e.cancel) {
|
|
39969
|
+
return;
|
|
39970
|
+
}
|
|
39971
|
+
this.searchValue = '';
|
|
39972
|
+
if (!e.event) {
|
|
39973
|
+
(_a = this.comboInput) === null || _a === void 0 ? void 0 : _a.nativeElement.focus();
|
|
39974
|
+
}
|
|
39975
|
+
};
|
|
39976
|
+
/** @hidden @internal */
|
|
39977
|
+
IgxComboBaseDirective.prototype.handleClosed = function () {
|
|
39978
|
+
this.closed.emit({ owner: this });
|
|
39979
|
+
};
|
|
39980
|
+
/** @hidden @internal */
|
|
39981
|
+
IgxComboBaseDirective.prototype.handleKeyDown = function (event) {
|
|
39982
|
+
if (event.key === 'ArrowUp' || event.key === 'Up') {
|
|
39983
|
+
event.preventDefault();
|
|
39984
|
+
event.stopPropagation();
|
|
39985
|
+
this.close();
|
|
39986
|
+
}
|
|
39987
|
+
};
|
|
39988
|
+
/** @hidden @internal */
|
|
39989
|
+
IgxComboBaseDirective.prototype.registerOnChange = function (fn) {
|
|
39990
|
+
this._onChangeCallback = fn;
|
|
39991
|
+
};
|
|
39992
|
+
/** @hidden @internal */
|
|
39993
|
+
IgxComboBaseDirective.prototype.registerOnTouched = function (fn) {
|
|
39994
|
+
this._onTouchedCallback = fn;
|
|
39995
|
+
};
|
|
39996
|
+
/** @hidden @internal */
|
|
39997
|
+
IgxComboBaseDirective.prototype.setDisabledState = function (isDisabled) {
|
|
39998
|
+
this.disabled = isDisabled;
|
|
39999
|
+
};
|
|
40000
|
+
/** @hidden @internal */
|
|
40001
|
+
IgxComboBaseDirective.prototype.onClick = function (event) {
|
|
40002
|
+
event.stopPropagation();
|
|
40003
|
+
event.preventDefault();
|
|
40004
|
+
if (!this.disabled) {
|
|
40005
|
+
this.toggle();
|
|
40006
|
+
}
|
|
40007
|
+
};
|
|
40008
|
+
/** @hidden @internal */
|
|
40009
|
+
IgxComboBaseDirective.prototype.onBlur = function () {
|
|
40010
|
+
if (this.collapsed) {
|
|
40011
|
+
this._onTouchedCallback();
|
|
40012
|
+
if (this.ngControl && this.ngControl.invalid) {
|
|
40013
|
+
this.valid = IgxComboState.INVALID;
|
|
40014
|
+
}
|
|
40015
|
+
else {
|
|
40016
|
+
this.valid = IgxComboState.INITIAL;
|
|
40017
|
+
}
|
|
40018
|
+
}
|
|
40019
|
+
};
|
|
40020
|
+
/** if there is a valueKey - map the keys to data items, else - just return the keys */
|
|
40021
|
+
IgxComboBaseDirective.prototype.convertKeysToItems = function (keys) {
|
|
40022
|
+
var _this = this;
|
|
40023
|
+
if (this.comboAPI.valueKey === null) {
|
|
40024
|
+
return keys;
|
|
40025
|
+
}
|
|
40026
|
+
// map keys vs. filter data to retain the order of the selected items
|
|
40027
|
+
return keys.map(function (key) { return _this.data.find(function (entry) { return entry[_this.valueKey] === key; }); }).filter(function (e) { return e !== undefined; });
|
|
40028
|
+
};
|
|
40029
|
+
IgxComboBaseDirective.prototype.checkMatch = function () {
|
|
40030
|
+
var itemMatch = this.filteredData.some(this.findMatch);
|
|
40031
|
+
this.customValueFlag = this.allowCustomValues && !itemMatch;
|
|
40032
|
+
};
|
|
40033
|
+
IgxComboBaseDirective.prototype.manageRequiredAsterisk = function () {
|
|
40034
|
+
if (this.ngControl && this.ngControl.control.validator) {
|
|
40035
|
+
// Run the validation with empty object to check if required is enabled.
|
|
40036
|
+
var error = this.ngControl.control.validator({});
|
|
40037
|
+
this.inputGroup.isRequired = error && error.required;
|
|
40038
|
+
}
|
|
40039
|
+
};
|
|
40040
|
+
/** Contains key-value pairs of the selected valueKeys and their resp. displayKeys */
|
|
40041
|
+
IgxComboBaseDirective.prototype.registerRemoteEntries = function (ids, add) {
|
|
40042
|
+
var e_1, _b, e_2, _c;
|
|
40043
|
+
if (add === void 0) { add = true; }
|
|
40044
|
+
if (add) {
|
|
40045
|
+
var selection = this.getValueDisplayPairs(ids);
|
|
40046
|
+
try {
|
|
40047
|
+
for (var selection_1 = __values(selection), selection_1_1 = selection_1.next(); !selection_1_1.done; selection_1_1 = selection_1.next()) {
|
|
40048
|
+
var entry = selection_1_1.value;
|
|
40049
|
+
this._remoteSelection[entry[this.valueKey]] = entry[this.displayKey];
|
|
40050
|
+
}
|
|
40051
|
+
}
|
|
40052
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
40053
|
+
finally {
|
|
40054
|
+
try {
|
|
40055
|
+
if (selection_1_1 && !selection_1_1.done && (_b = selection_1.return)) _b.call(selection_1);
|
|
40056
|
+
}
|
|
40057
|
+
finally { if (e_1) throw e_1.error; }
|
|
40058
|
+
}
|
|
40059
|
+
}
|
|
40060
|
+
else {
|
|
40061
|
+
try {
|
|
40062
|
+
for (var ids_1 = __values(ids), ids_1_1 = ids_1.next(); !ids_1_1.done; ids_1_1 = ids_1.next()) {
|
|
40063
|
+
var entry = ids_1_1.value;
|
|
40064
|
+
delete this._remoteSelection[entry];
|
|
40065
|
+
}
|
|
40066
|
+
}
|
|
40067
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
40068
|
+
finally {
|
|
40069
|
+
try {
|
|
40070
|
+
if (ids_1_1 && !ids_1_1.done && (_c = ids_1.return)) _c.call(ids_1);
|
|
40071
|
+
}
|
|
40072
|
+
finally { if (e_2) throw e_2.error; }
|
|
40073
|
+
}
|
|
40074
|
+
}
|
|
40075
|
+
};
|
|
40076
|
+
/**
|
|
40077
|
+
* For `id: any[]` returns a mapped `{ [combo.valueKey]: any, [combo.displayKey]: any }[]`
|
|
40078
|
+
*/
|
|
40079
|
+
IgxComboBaseDirective.prototype.getValueDisplayPairs = function (ids) {
|
|
40080
|
+
var _this = this;
|
|
40081
|
+
return this.data.filter(function (entry) { return ids.indexOf(entry[_this.valueKey]) > -1; }).map(function (e) {
|
|
40082
|
+
var _b;
|
|
40083
|
+
return (_b = {},
|
|
40084
|
+
_b[_this.valueKey] = e[_this.valueKey],
|
|
40085
|
+
_b[_this.displayKey] = e[_this.displayKey],
|
|
40086
|
+
_b);
|
|
40087
|
+
});
|
|
40088
|
+
};
|
|
40089
|
+
IgxComboBaseDirective.prototype.getRemoteSelection = function (newSelection, oldSelection) {
|
|
40090
|
+
var _this = this;
|
|
40091
|
+
if (!newSelection.length) {
|
|
40092
|
+
// If new selection is empty, clear all items
|
|
40093
|
+
this.registerRemoteEntries(oldSelection, false);
|
|
40094
|
+
return '';
|
|
40095
|
+
}
|
|
40096
|
+
var removedItems = oldSelection.filter(function (e) { return newSelection.indexOf(e) < 0; });
|
|
40097
|
+
var addedItems = newSelection.filter(function (e) { return oldSelection.indexOf(e) < 0; });
|
|
40098
|
+
this.registerRemoteEntries(addedItems);
|
|
40099
|
+
this.registerRemoteEntries(removedItems, false);
|
|
40100
|
+
return Object.keys(this._remoteSelection).map(function (e) { return _this._remoteSelection[e]; }).join(', ');
|
|
40101
|
+
};
|
|
40102
|
+
return IgxComboBaseDirective;
|
|
40103
|
+
}(DisplayDensityBase));
|
|
40104
|
+
IgxComboBaseDirective.decorators = [
|
|
40105
|
+
{ type: i0.Directive }
|
|
40106
|
+
];
|
|
40107
|
+
IgxComboBaseDirective.ctorParameters = function () { return [
|
|
40108
|
+
{ type: i0.ElementRef },
|
|
40109
|
+
{ type: i0.ChangeDetectorRef },
|
|
40110
|
+
{ type: IgxSelectionAPIService },
|
|
40111
|
+
{ type: IgxComboAPIService },
|
|
40112
|
+
{ type: IgxIconService },
|
|
40113
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [DisplayDensityToken,] }] },
|
|
40114
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [IGX_INPUT_GROUP_TYPE,] }] },
|
|
40115
|
+
{ type: i0.Injector, decorators: [{ type: i0.Optional }] }
|
|
40116
|
+
]; };
|
|
40117
|
+
IgxComboBaseDirective.propDecorators = {
|
|
40118
|
+
overlaySettings: [{ type: i0.Input }],
|
|
40119
|
+
id: [{ type: i0.HostBinding, args: ['attr.id',] }, { type: i0.Input }],
|
|
40120
|
+
width: [{ type: i0.HostBinding, args: ['style.width',] }, { type: i0.Input }],
|
|
40121
|
+
allowCustomValues: [{ type: i0.Input }],
|
|
40122
|
+
itemsMaxHeight: [{ type: i0.Input }],
|
|
40123
|
+
itemHeight: [{ type: i0.Input }],
|
|
40124
|
+
itemsWidth: [{ type: i0.Input }],
|
|
40125
|
+
placeholder: [{ type: i0.Input }],
|
|
40126
|
+
data: [{ type: i0.Input }],
|
|
40127
|
+
valueKey: [{ type: i0.Input }],
|
|
40128
|
+
displayKey: [{ type: i0.Input }],
|
|
40129
|
+
groupKey: [{ type: i0.Input }],
|
|
40130
|
+
ariaLabelledBy: [{ type: i0.Input }, { type: i0.HostBinding, args: ['attr.aria-labelledby',] }],
|
|
40131
|
+
cssClass: [{ type: i0.HostBinding, args: ['class.igx-combo',] }],
|
|
40132
|
+
role: [{ type: i0.HostBinding, args: ["attr.role",] }],
|
|
40133
|
+
ariaExpanded: [{ type: i0.HostBinding, args: ['attr.aria-expanded',] }],
|
|
40134
|
+
hasPopUp: [{ type: i0.HostBinding, args: ['attr.aria-haspopup',] }],
|
|
40135
|
+
ariaOwns: [{ type: i0.HostBinding, args: ['attr.aria-owns',] }],
|
|
40136
|
+
disabled: [{ type: i0.Input }],
|
|
40137
|
+
type: [{ type: i0.Input }],
|
|
40138
|
+
selectionChanging: [{ type: i0.Output }],
|
|
40139
|
+
opening: [{ type: i0.Output }],
|
|
40140
|
+
opened: [{ type: i0.Output }],
|
|
40141
|
+
closing: [{ type: i0.Output }],
|
|
40142
|
+
closed: [{ type: i0.Output }],
|
|
40143
|
+
addition: [{ type: i0.Output }],
|
|
40144
|
+
searchInputUpdate: [{ type: i0.Output }],
|
|
40145
|
+
dataPreLoad: [{ type: i0.Output }],
|
|
40146
|
+
itemTemplate: [{ type: i0.ContentChild, args: [IgxComboItemDirective, { read: i0.TemplateRef },] }],
|
|
40147
|
+
headerTemplate: [{ type: i0.ContentChild, args: [IgxComboHeaderDirective, { read: i0.TemplateRef },] }],
|
|
40148
|
+
footerTemplate: [{ type: i0.ContentChild, args: [IgxComboFooterDirective, { read: i0.TemplateRef },] }],
|
|
40149
|
+
headerItemTemplate: [{ type: i0.ContentChild, args: [IgxComboHeaderItemDirective, { read: i0.TemplateRef },] }],
|
|
40150
|
+
addItemTemplate: [{ type: i0.ContentChild, args: [IgxComboAddItemDirective, { read: i0.TemplateRef },] }],
|
|
40151
|
+
emptyTemplate: [{ type: i0.ContentChild, args: [IgxComboEmptyDirective, { read: i0.TemplateRef },] }],
|
|
40152
|
+
toggleIconTemplate: [{ type: i0.ContentChild, args: [IgxComboToggleIconDirective, { read: i0.TemplateRef },] }],
|
|
40153
|
+
clearIconTemplate: [{ type: i0.ContentChild, args: [IgxComboClearIconDirective, { read: i0.TemplateRef },] }],
|
|
40154
|
+
inputGroup: [{ type: i0.ViewChild, args: ['inputGroup', { read: IgxInputGroupComponent, static: true },] }],
|
|
40155
|
+
comboInput: [{ type: i0.ViewChild, args: ['comboInput', { read: IgxInputDirective, static: true },] }],
|
|
40156
|
+
searchInput: [{ type: i0.ViewChild, args: ['searchInput',] }],
|
|
40157
|
+
virtualScrollContainer: [{ type: i0.ViewChild, args: [IgxForOfDirective, { static: true },] }],
|
|
40158
|
+
virtDir: [{ type: i0.ViewChild, args: [IgxForOfDirective, { read: IgxForOfDirective, static: true },] }],
|
|
40159
|
+
dropdownContainer: [{ type: i0.ViewChild, args: ['dropdownItemContainer', { static: true },] }],
|
|
40160
|
+
primitiveTemplate: [{ type: i0.ViewChild, args: ['primitive', { read: i0.TemplateRef, static: true },] }],
|
|
40161
|
+
complexTemplate: [{ type: i0.ViewChild, args: ['complex', { read: i0.TemplateRef, static: true },] }],
|
|
40162
|
+
onArrowDown: [{ type: i0.HostListener, args: ['keydown.ArrowDown', ['$event'],] }, { type: i0.HostListener, args: ['keydown.Alt.ArrowDown', ['$event'],] }]
|
|
40163
|
+
};
|
|
40164
|
+
|
|
40165
|
+
/**
|
|
40166
|
+
* @hidden
|
|
40167
|
+
*/
|
|
40168
|
+
var IgxComboAddItemComponent = /** @class */ (function (_super) {
|
|
40169
|
+
__extends(IgxComboAddItemComponent, _super);
|
|
40170
|
+
function IgxComboAddItemComponent() {
|
|
40171
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
40172
|
+
}
|
|
40173
|
+
Object.defineProperty(IgxComboAddItemComponent.prototype, "selected", {
|
|
40174
|
+
get: function () {
|
|
40175
|
+
return false;
|
|
40176
|
+
},
|
|
40177
|
+
set: function (value) {
|
|
40178
|
+
},
|
|
40179
|
+
enumerable: false,
|
|
40180
|
+
configurable: true
|
|
40181
|
+
});
|
|
40182
|
+
/**
|
|
40183
|
+
* @inheritdoc
|
|
40184
|
+
*/
|
|
40185
|
+
IgxComboAddItemComponent.prototype.clicked = function (event) {
|
|
40186
|
+
this.comboAPI.disableTransitions = false;
|
|
40187
|
+
this.comboAPI.add_custom_item();
|
|
40188
|
+
};
|
|
40189
|
+
return IgxComboAddItemComponent;
|
|
40190
|
+
}(IgxComboItemComponent));
|
|
40191
|
+
IgxComboAddItemComponent.decorators = [
|
|
40192
|
+
{ type: i0.Component, args: [{
|
|
40193
|
+
selector: 'igx-combo-add-item',
|
|
40194
|
+
template: '<ng-content></ng-content>',
|
|
40195
|
+
providers: [{ provide: IgxComboItemComponent, useExisting: IgxComboAddItemComponent }]
|
|
40196
|
+
},] }
|
|
40197
|
+
];
|
|
40198
|
+
|
|
40199
|
+
/** @hidden */
|
|
40200
|
+
var IgxComboDropDownComponent = /** @class */ (function (_super) {
|
|
40201
|
+
__extends(IgxComboDropDownComponent, _super);
|
|
40202
|
+
function IgxComboDropDownComponent(elementRef, cdr, platform, selection, combo, comboAPI, _displayDensityOptions) {
|
|
40203
|
+
var _this = _super.call(this, elementRef, cdr, platform, selection, _displayDensityOptions) || this;
|
|
40204
|
+
_this.elementRef = elementRef;
|
|
40205
|
+
_this.cdr = cdr;
|
|
40206
|
+
_this.platform = platform;
|
|
40207
|
+
_this.selection = selection;
|
|
40208
|
+
_this.combo = combo;
|
|
40209
|
+
_this.comboAPI = comboAPI;
|
|
40210
|
+
_this._displayDensityOptions = _displayDensityOptions;
|
|
40211
|
+
/** @hidden @internal */
|
|
40212
|
+
_this.singleMode = false;
|
|
40213
|
+
/**
|
|
40214
|
+
* @hidden
|
|
40215
|
+
* @internal
|
|
40216
|
+
*/
|
|
40217
|
+
_this.children = null;
|
|
40218
|
+
_this.scrollHandler = function () {
|
|
40219
|
+
_this.comboAPI.disableTransitions = true;
|
|
40220
|
+
};
|
|
40221
|
+
return _this;
|
|
40222
|
+
}
|
|
40223
|
+
Object.defineProperty(IgxComboDropDownComponent.prototype, "scrollContainer", {
|
|
40224
|
+
/** @hidden @internal */
|
|
40225
|
+
get: function () {
|
|
40226
|
+
return this.virtDir.dc.location.nativeElement;
|
|
40227
|
+
},
|
|
40228
|
+
enumerable: false,
|
|
40229
|
+
configurable: true
|
|
40230
|
+
});
|
|
40231
|
+
Object.defineProperty(IgxComboDropDownComponent.prototype, "isScrolledToLast", {
|
|
40232
|
+
get: function () {
|
|
40233
|
+
var scrollTop = this.virtDir.scrollPosition;
|
|
40234
|
+
var scrollHeight = this.virtDir.getScroll().scrollHeight;
|
|
40235
|
+
return Math.floor(scrollTop + this.virtDir.igxForContainerSize) === scrollHeight;
|
|
40236
|
+
},
|
|
40237
|
+
enumerable: false,
|
|
40238
|
+
configurable: true
|
|
40239
|
+
});
|
|
40240
|
+
Object.defineProperty(IgxComboDropDownComponent.prototype, "lastVisibleIndex", {
|
|
40241
|
+
get: function () {
|
|
40242
|
+
return this.combo.totalItemCount ?
|
|
40243
|
+
Math.floor(this.combo.itemsMaxHeight / this.combo.itemHeight) :
|
|
40244
|
+
this.items.length - 1;
|
|
40245
|
+
},
|
|
40246
|
+
enumerable: false,
|
|
40247
|
+
configurable: true
|
|
40248
|
+
});
|
|
40249
|
+
Object.defineProperty(IgxComboDropDownComponent.prototype, "sortedChildren", {
|
|
40250
|
+
get: function () {
|
|
40251
|
+
if (this.children !== undefined) {
|
|
40252
|
+
return this.children.toArray()
|
|
40253
|
+
.sort(function (a, b) { return a.index - b.index; });
|
|
40254
|
+
}
|
|
40255
|
+
return null;
|
|
40256
|
+
},
|
|
40257
|
+
enumerable: false,
|
|
40258
|
+
configurable: true
|
|
40259
|
+
});
|
|
40260
|
+
Object.defineProperty(IgxComboDropDownComponent.prototype, "items", {
|
|
40261
|
+
/**
|
|
40262
|
+
* Get all non-header items
|
|
40263
|
+
*
|
|
40264
|
+
* ```typescript
|
|
40265
|
+
* let myDropDownItems = this.dropdown.items;
|
|
40266
|
+
* ```
|
|
40267
|
+
*/
|
|
40268
|
+
get: function () {
|
|
40269
|
+
var e_1, _a;
|
|
40270
|
+
var items = [];
|
|
40271
|
+
if (this.children !== undefined) {
|
|
40272
|
+
var sortedChildren = this.sortedChildren;
|
|
40273
|
+
try {
|
|
40274
|
+
for (var sortedChildren_1 = __values(sortedChildren), sortedChildren_1_1 = sortedChildren_1.next(); !sortedChildren_1_1.done; sortedChildren_1_1 = sortedChildren_1.next()) {
|
|
40275
|
+
var child = sortedChildren_1_1.value;
|
|
40276
|
+
if (!child.isHeader) {
|
|
40277
|
+
items.push(child);
|
|
40278
|
+
}
|
|
40279
|
+
}
|
|
40280
|
+
}
|
|
40281
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
40282
|
+
finally {
|
|
40283
|
+
try {
|
|
40284
|
+
if (sortedChildren_1_1 && !sortedChildren_1_1.done && (_a = sortedChildren_1.return)) _a.call(sortedChildren_1);
|
|
40285
|
+
}
|
|
40286
|
+
finally { if (e_1) throw e_1.error; }
|
|
40287
|
+
}
|
|
40288
|
+
}
|
|
40289
|
+
return items;
|
|
40290
|
+
},
|
|
40291
|
+
enumerable: false,
|
|
40292
|
+
configurable: true
|
|
40293
|
+
});
|
|
40294
|
+
/**
|
|
40295
|
+
* @hidden @internal
|
|
40296
|
+
*/
|
|
40297
|
+
IgxComboDropDownComponent.prototype.onFocus = function () {
|
|
40298
|
+
this.focusedItem = this._focusedItem || this.items[0];
|
|
40299
|
+
};
|
|
40300
|
+
/**
|
|
40301
|
+
* @hidden @internal
|
|
40302
|
+
*/
|
|
40303
|
+
IgxComboDropDownComponent.prototype.onBlur = function (_evt) {
|
|
40304
|
+
this.focusedItem = null;
|
|
40305
|
+
};
|
|
40306
|
+
/**
|
|
40307
|
+
* @hidden @internal
|
|
40308
|
+
*/
|
|
40309
|
+
IgxComboDropDownComponent.prototype.onToggleOpened = function () {
|
|
40310
|
+
this.opened.emit();
|
|
40311
|
+
};
|
|
40312
|
+
/**
|
|
40313
|
+
* @hidden
|
|
40314
|
+
*/
|
|
40315
|
+
IgxComboDropDownComponent.prototype.navigateFirst = function () {
|
|
40316
|
+
this.navigateItem(this.virtDir.igxForOf.findIndex(function (e) { return !e.isHeader; }));
|
|
40317
|
+
};
|
|
40318
|
+
/**
|
|
40319
|
+
* @hidden
|
|
40320
|
+
*/
|
|
40321
|
+
IgxComboDropDownComponent.prototype.navigatePrev = function () {
|
|
40322
|
+
if (this._focusedItem && this._focusedItem.index === 0 && this.virtDir.state.startIndex === 0) {
|
|
40323
|
+
this.combo.focusSearchInput(false);
|
|
40324
|
+
}
|
|
40325
|
+
else {
|
|
40326
|
+
_super.prototype.navigatePrev.call(this);
|
|
40327
|
+
}
|
|
40328
|
+
};
|
|
40329
|
+
/**
|
|
40330
|
+
* @hidden
|
|
40331
|
+
*/
|
|
40332
|
+
IgxComboDropDownComponent.prototype.navigateNext = function () {
|
|
40333
|
+
var lastIndex = this.combo.totalItemCount ? this.combo.totalItemCount - 1 : this.virtDir.igxForOf.length - 1;
|
|
40334
|
+
if (this._focusedItem && this._focusedItem.index === lastIndex) {
|
|
40335
|
+
this.focusAddItemButton();
|
|
40336
|
+
}
|
|
40337
|
+
else {
|
|
40338
|
+
_super.prototype.navigateNext.call(this);
|
|
40339
|
+
}
|
|
40340
|
+
};
|
|
40341
|
+
/**
|
|
40342
|
+
* @hidden @internal
|
|
40343
|
+
*/
|
|
40344
|
+
IgxComboDropDownComponent.prototype.selectItem = function (item) {
|
|
40345
|
+
if (item === null || item === undefined) {
|
|
40346
|
+
return;
|
|
40347
|
+
}
|
|
40348
|
+
this.comboAPI.set_selected_item(item.itemID);
|
|
40349
|
+
this._focusedItem = item;
|
|
40350
|
+
};
|
|
40351
|
+
/**
|
|
40352
|
+
* @hidden @internal
|
|
40353
|
+
*/
|
|
40354
|
+
IgxComboDropDownComponent.prototype.updateScrollPosition = function () {
|
|
40355
|
+
this.virtDir.getScroll().scrollTop = this._scrollPosition;
|
|
40356
|
+
};
|
|
40357
|
+
/**
|
|
40358
|
+
* @hidden @internal
|
|
40359
|
+
*/
|
|
40360
|
+
IgxComboDropDownComponent.prototype.onItemActionKey = function (key) {
|
|
40361
|
+
switch (key) {
|
|
40362
|
+
case DropDownActionKey.ENTER:
|
|
40363
|
+
this.handleEnter();
|
|
40364
|
+
break;
|
|
40365
|
+
case DropDownActionKey.SPACE:
|
|
40366
|
+
this.handleSpace();
|
|
40367
|
+
break;
|
|
40368
|
+
case DropDownActionKey.ESCAPE:
|
|
40369
|
+
this.close();
|
|
40370
|
+
}
|
|
40371
|
+
};
|
|
40372
|
+
IgxComboDropDownComponent.prototype.ngAfterViewInit = function () {
|
|
40373
|
+
this.virtDir.getScroll().addEventListener('scroll', this.scrollHandler);
|
|
40374
|
+
};
|
|
40375
|
+
/**
|
|
40376
|
+
* @hidden @internal
|
|
40377
|
+
*/
|
|
40378
|
+
IgxComboDropDownComponent.prototype.ngOnDestroy = function () {
|
|
40379
|
+
this.virtDir.getScroll().removeEventListener('scroll', this.scrollHandler);
|
|
40380
|
+
this.destroy$.next(true);
|
|
40381
|
+
this.destroy$.complete();
|
|
40382
|
+
};
|
|
40383
|
+
IgxComboDropDownComponent.prototype.scrollToHiddenItem = function (_newItem) { };
|
|
40384
|
+
IgxComboDropDownComponent.prototype.handleEnter = function () {
|
|
40385
|
+
if (this.isAddItemFocused()) {
|
|
40386
|
+
this.combo.addItemToCollection();
|
|
40387
|
+
return;
|
|
40388
|
+
}
|
|
40389
|
+
if (this.singleMode && this.focusedItem) {
|
|
40390
|
+
this.combo.select(this.focusedItem.itemID);
|
|
40391
|
+
}
|
|
40392
|
+
this.close();
|
|
40393
|
+
};
|
|
40394
|
+
IgxComboDropDownComponent.prototype.handleSpace = function () {
|
|
40395
|
+
if (this.isAddItemFocused()) {
|
|
40396
|
+
return;
|
|
40397
|
+
}
|
|
40398
|
+
else {
|
|
40399
|
+
this.selectItem(this.focusedItem);
|
|
40400
|
+
}
|
|
40401
|
+
};
|
|
40402
|
+
IgxComboDropDownComponent.prototype.isAddItemFocused = function () {
|
|
40403
|
+
return this.focusedItem instanceof IgxComboAddItemComponent;
|
|
40404
|
+
};
|
|
40405
|
+
IgxComboDropDownComponent.prototype.focusAddItemButton = function () {
|
|
40406
|
+
if (this.combo.isAddButtonVisible()) {
|
|
40407
|
+
this.focusedItem = this.items[this.items.length - 1];
|
|
40408
|
+
}
|
|
40409
|
+
};
|
|
40410
|
+
return IgxComboDropDownComponent;
|
|
40411
|
+
}(IgxDropDownComponent));
|
|
40412
|
+
IgxComboDropDownComponent.decorators = [
|
|
40413
|
+
{ type: i0.Component, args: [{
|
|
40414
|
+
selector: 'igx-combo-drop-down',
|
|
40415
|
+
template: "<div class=\"igx-drop-down__list\" [style.width]=\"width\"\nigxToggle\n(appended)=\"onToggleContentAppended($event)\"\n(opening)=\"onToggleOpening($event)\" (opened)=\"onToggleOpened()\"\n(closing)=\"onToggleClosing($event)\" (closed)=\"onToggleClosed()\">\n <div class=\"igx-drop-down__list-scroll\" #scrollContainer [attr.id]=\"this.listId\" role=\"listbox\" [attr.aria-label]=\"this.listId\"\n [style.height]=\"height\"\n [style.maxHeight]=\"maxHeight\">\n <ng-container *ngIf=\"!collapsed\">\n <ng-content></ng-content>\n </ng-container>\n </div>\n</div>\n",
|
|
40416
|
+
providers: [{ provide: IGX_DROPDOWN_BASE, useExisting: IgxComboDropDownComponent }]
|
|
40417
|
+
},] }
|
|
40418
|
+
];
|
|
40419
|
+
IgxComboDropDownComponent.ctorParameters = function () { return [
|
|
40420
|
+
{ type: i0.ElementRef },
|
|
40421
|
+
{ type: i0.ChangeDetectorRef },
|
|
40422
|
+
{ type: PlatformUtil },
|
|
40423
|
+
{ type: IgxSelectionAPIService },
|
|
40424
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [IGX_COMBO_COMPONENT,] }] },
|
|
40425
|
+
{ type: IgxComboAPIService },
|
|
40426
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [DisplayDensityToken,] }] }
|
|
40427
|
+
]; };
|
|
40428
|
+
IgxComboDropDownComponent.propDecorators = {
|
|
40429
|
+
singleMode: [{ type: i0.Input }],
|
|
40430
|
+
children: [{ type: i0.ContentChildren, args: [IgxComboItemComponent, { descendants: true },] }]
|
|
40431
|
+
};
|
|
40432
|
+
|
|
40433
|
+
/**
|
|
40434
|
+
* @hidden
|
|
40435
|
+
*/
|
|
40436
|
+
var IgxComboFilteringPipe = /** @class */ (function () {
|
|
40437
|
+
function IgxComboFilteringPipe() {
|
|
40438
|
+
}
|
|
40439
|
+
IgxComboFilteringPipe.prototype.transform = function (collection, searchValue, displayKey, filteringOptions, shouldFilter) {
|
|
40440
|
+
if (shouldFilter === void 0) { shouldFilter = false; }
|
|
40441
|
+
if (!collection) {
|
|
40442
|
+
return [];
|
|
40443
|
+
}
|
|
40444
|
+
if (!searchValue || !shouldFilter) {
|
|
40445
|
+
return collection;
|
|
40446
|
+
}
|
|
40447
|
+
else {
|
|
40448
|
+
var searchTerm_1 = filteringOptions.caseSensitive ? searchValue.trim() : searchValue.toLowerCase().trim();
|
|
40449
|
+
if (displayKey != null) {
|
|
40450
|
+
return collection.filter(function (e) { return filteringOptions.caseSensitive ? e[displayKey].includes(searchTerm_1) :
|
|
40451
|
+
e[displayKey].toString().toLowerCase().includes(searchTerm_1); });
|
|
40452
|
+
}
|
|
40453
|
+
else {
|
|
40454
|
+
return collection.filter(function (e) { return filteringOptions.caseSensitive ? e.includes(searchTerm_1) :
|
|
40455
|
+
e.toString().toLowerCase().includes(searchTerm_1); });
|
|
40456
|
+
}
|
|
40457
|
+
}
|
|
40458
|
+
};
|
|
40459
|
+
return IgxComboFilteringPipe;
|
|
40460
|
+
}());
|
|
40461
|
+
IgxComboFilteringPipe.decorators = [
|
|
40462
|
+
{ type: i0.Pipe, args: [{
|
|
40463
|
+
name: 'comboFiltering'
|
|
40464
|
+
},] }
|
|
40465
|
+
];
|
|
40466
|
+
/**
|
|
40467
|
+
* @hidden
|
|
40468
|
+
*/
|
|
40469
|
+
var IgxComboGroupingPipe = /** @class */ (function () {
|
|
40470
|
+
function IgxComboGroupingPipe(combo) {
|
|
40471
|
+
this.combo = combo;
|
|
40472
|
+
}
|
|
40473
|
+
IgxComboGroupingPipe.prototype.transform = function (collection, groupKey, valueKey) {
|
|
40474
|
+
var _a;
|
|
40475
|
+
this.combo.filteredData = collection;
|
|
40476
|
+
if ((!groupKey && groupKey !== 0) || !collection.length) {
|
|
40477
|
+
return collection;
|
|
40478
|
+
}
|
|
40479
|
+
var sorted = DataUtil.sort(cloneArray(collection), [{
|
|
40480
|
+
fieldName: groupKey,
|
|
40481
|
+
dir: exports.SortingDirection.Asc,
|
|
40482
|
+
ignoreCase: true,
|
|
40483
|
+
strategy: DefaultSortingStrategy.instance()
|
|
40484
|
+
}]);
|
|
40485
|
+
var data = cloneArray(sorted);
|
|
40486
|
+
var inserts = 0;
|
|
40487
|
+
var currentHeader = null;
|
|
40488
|
+
for (var i = 0; i < sorted.length; i++) {
|
|
40489
|
+
var insertFlag = 0;
|
|
40490
|
+
if (currentHeader !== sorted[i][groupKey]) {
|
|
40491
|
+
currentHeader = sorted[i][groupKey];
|
|
40492
|
+
insertFlag = 1;
|
|
40493
|
+
}
|
|
40494
|
+
if (insertFlag) {
|
|
40495
|
+
data.splice(i + inserts, 0, (_a = {},
|
|
40496
|
+
_a[valueKey] = currentHeader,
|
|
40497
|
+
_a[groupKey] = currentHeader,
|
|
40498
|
+
_a.isHeader = true,
|
|
40499
|
+
_a));
|
|
40500
|
+
inserts++;
|
|
40501
|
+
}
|
|
40502
|
+
}
|
|
40503
|
+
return data;
|
|
40504
|
+
};
|
|
40505
|
+
return IgxComboGroupingPipe;
|
|
40506
|
+
}());
|
|
40507
|
+
IgxComboGroupingPipe.decorators = [
|
|
40508
|
+
{ type: i0.Pipe, args: [{
|
|
40509
|
+
name: 'comboGrouping'
|
|
40510
|
+
},] }
|
|
40511
|
+
];
|
|
40512
|
+
IgxComboGroupingPipe.ctorParameters = function () { return [
|
|
40513
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [IGX_COMBO_COMPONENT,] }] }
|
|
40514
|
+
]; };
|
|
40515
|
+
|
|
40516
|
+
/**
|
|
40517
|
+
* When called with sets A & B, returns A - B (as array);
|
|
40518
|
+
*
|
|
40519
|
+
* @hidden
|
|
40520
|
+
*/
|
|
40521
|
+
var diffInSets = function (set1, set2) {
|
|
40522
|
+
var results = [];
|
|
40523
|
+
set1.forEach(function (entry) {
|
|
40524
|
+
if (!set2.has(entry)) {
|
|
40525
|
+
results.push(entry);
|
|
40526
|
+
}
|
|
40527
|
+
});
|
|
40528
|
+
return results;
|
|
40529
|
+
};
|
|
40530
|
+
var ɵ0$1 = diffInSets;
|
|
40531
|
+
/**
|
|
40532
|
+
* Represents a drop-down list that provides editable functionalities, allowing users to choose an option from a predefined list.
|
|
40533
|
+
*
|
|
40534
|
+
* @igxModule IgxComboModule
|
|
40535
|
+
* @igxTheme igx-combo-theme
|
|
40536
|
+
* @igxKeywords combobox, combo selection
|
|
40537
|
+
* @igxGroup Grids & Lists
|
|
40538
|
+
*
|
|
40539
|
+
* @remarks
|
|
40540
|
+
* It provides the ability to filter items as well as perform selection with the provided data.
|
|
40541
|
+
* Additionally, it exposes keyboard navigation and custom styling capabilities.
|
|
40542
|
+
* @example
|
|
40543
|
+
* ```html
|
|
40544
|
+
* <igx-combo [itemsMaxHeight]="250" [data]="locationData"
|
|
40545
|
+
* [displayKey]="'field'" [valueKey]="'field'"
|
|
40546
|
+
* placeholder="Location(s)" searchPlaceholder="Search...">
|
|
40547
|
+
* </igx-combo>
|
|
40548
|
+
* ```
|
|
40549
|
+
*/
|
|
40550
|
+
var IgxComboComponent = /** @class */ (function (_super) {
|
|
40551
|
+
__extends(IgxComboComponent, _super);
|
|
40552
|
+
function IgxComboComponent(elementRef, cdr, selectionService, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector) {
|
|
40553
|
+
var _this = _super.call(this, elementRef, cdr, selectionService, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector) || this;
|
|
40554
|
+
_this.elementRef = elementRef;
|
|
40555
|
+
_this.cdr = cdr;
|
|
40556
|
+
_this.selectionService = selectionService;
|
|
40557
|
+
_this.comboAPI = comboAPI;
|
|
40558
|
+
_this._iconService = _iconService;
|
|
40559
|
+
_this._displayDensityOptions = _displayDensityOptions;
|
|
40560
|
+
_this._inputGroupType = _inputGroupType;
|
|
40561
|
+
_this._injector = _injector;
|
|
40095
40562
|
/**
|
|
40096
|
-
*
|
|
40563
|
+
* Defines whether the caseSensitive icon should be shown in the search input
|
|
40097
40564
|
*
|
|
40098
40565
|
* ```typescript
|
|
40099
40566
|
* // get
|
|
40100
|
-
* let
|
|
40567
|
+
* let myComboShowSearchCaseIcon = this.combo.showSearchCaseIcon;
|
|
40101
40568
|
* ```
|
|
40102
|
-
*/
|
|
40103
|
-
get: function () {
|
|
40104
|
-
return this._valid;
|
|
40105
|
-
},
|
|
40106
|
-
/**
|
|
40107
|
-
* Sets if control is valid, when used in a form
|
|
40108
40569
|
*
|
|
40109
|
-
* ```
|
|
40110
|
-
*
|
|
40111
|
-
*
|
|
40570
|
+
* ```html
|
|
40571
|
+
* <!--set-->
|
|
40572
|
+
* <igx-combo [showSearchCaseIcon]='true'></igx-combo>
|
|
40112
40573
|
* ```
|
|
40113
40574
|
*/
|
|
40114
|
-
|
|
40115
|
-
this._valid = valid;
|
|
40116
|
-
this.comboInput.valid = exports.IgxInputState[exports.IgxComboState[valid]];
|
|
40117
|
-
},
|
|
40118
|
-
enumerable: false,
|
|
40119
|
-
configurable: true
|
|
40120
|
-
});
|
|
40121
|
-
Object.defineProperty(IgxComboComponent.prototype, "searchValue", {
|
|
40575
|
+
_this.showSearchCaseIcon = false;
|
|
40122
40576
|
/**
|
|
40123
|
-
* @
|
|
40577
|
+
* An @Input property that controls whether the combo's search box
|
|
40578
|
+
* should be focused after the `opened` event is called
|
|
40579
|
+
* When `false`, the combo's list item container will be focused instead
|
|
40124
40580
|
*/
|
|
40125
|
-
|
|
40126
|
-
return this._searchValue;
|
|
40127
|
-
},
|
|
40128
|
-
set: function (val) {
|
|
40129
|
-
this.filterValue = val;
|
|
40130
|
-
this._searchValue = val;
|
|
40131
|
-
},
|
|
40132
|
-
enumerable: false,
|
|
40133
|
-
configurable: true
|
|
40134
|
-
});
|
|
40135
|
-
/**
|
|
40136
|
-
* @hidden @internal
|
|
40137
|
-
*/
|
|
40138
|
-
IgxComboComponent.prototype.onArrowDown = function (event) {
|
|
40139
|
-
event.preventDefault();
|
|
40140
|
-
event.stopPropagation();
|
|
40141
|
-
this.open();
|
|
40142
|
-
};
|
|
40143
|
-
/**
|
|
40144
|
-
* @hidden @internal
|
|
40145
|
-
*/
|
|
40146
|
-
IgxComboComponent.prototype.onInputClick = function (event) {
|
|
40147
|
-
event.stopPropagation();
|
|
40148
|
-
event.preventDefault();
|
|
40149
|
-
if (!this.disabled) {
|
|
40150
|
-
this.toggle();
|
|
40151
|
-
}
|
|
40152
|
-
};
|
|
40153
|
-
Object.defineProperty(IgxComboComponent.prototype, "virtualizationState", {
|
|
40581
|
+
_this.autoFocusSearch = true;
|
|
40154
40582
|
/**
|
|
40155
|
-
*
|
|
40156
|
-
*
|
|
40157
|
-
*
|
|
40158
|
-
* // get
|
|
40159
|
-
* let state = this.combo.virtualizationState;
|
|
40583
|
+
* An @Input property that enabled/disables filtering in the list. The default is `true`.
|
|
40584
|
+
* ```html
|
|
40585
|
+
* <igx-combo [filterable]="false">
|
|
40160
40586
|
* ```
|
|
40161
40587
|
*/
|
|
40162
|
-
|
|
40163
|
-
return this.virtDir.state;
|
|
40164
|
-
},
|
|
40588
|
+
_this.filterable = true;
|
|
40165
40589
|
/**
|
|
40166
|
-
*
|
|
40590
|
+
* Defines the placeholder value for the combo dropdown search field
|
|
40167
40591
|
*
|
|
40168
40592
|
* ```typescript
|
|
40169
|
-
* //
|
|
40170
|
-
* this.combo.
|
|
40593
|
+
* // get
|
|
40594
|
+
* let myComboSearchPlaceholder = this.combo.searchPlaceholder;
|
|
40171
40595
|
* ```
|
|
40172
|
-
*/
|
|
40173
|
-
set: function (state) {
|
|
40174
|
-
this.virtDir.state = state;
|
|
40175
|
-
},
|
|
40176
|
-
enumerable: false,
|
|
40177
|
-
configurable: true
|
|
40178
|
-
});
|
|
40179
|
-
Object.defineProperty(IgxComboComponent.prototype, "totalItemCount", {
|
|
40180
|
-
/**
|
|
40181
|
-
* Gets total count of the virtual data items, when using remote service.
|
|
40182
40596
|
*
|
|
40183
|
-
* ```
|
|
40184
|
-
*
|
|
40185
|
-
*
|
|
40597
|
+
* ```html
|
|
40598
|
+
* <!--set-->
|
|
40599
|
+
* <igx-combo [searchPlaceholder]='newPlaceHolder'></igx-combo>
|
|
40186
40600
|
* ```
|
|
40187
40601
|
*/
|
|
40188
|
-
|
|
40189
|
-
return this.virtDir.totalItemCount;
|
|
40190
|
-
},
|
|
40602
|
+
_this.searchPlaceholder = 'Enter a Search Term';
|
|
40191
40603
|
/**
|
|
40192
|
-
*
|
|
40193
|
-
*
|
|
40194
|
-
* ```typescript
|
|
40195
|
-
* // set
|
|
40196
|
-
* this.combo.totalItemCount(remoteService.count);
|
|
40197
|
-
* ```
|
|
40604
|
+
* @hidden @internal
|
|
40198
40605
|
*/
|
|
40199
|
-
|
|
40200
|
-
|
|
40201
|
-
|
|
40202
|
-
|
|
40203
|
-
|
|
40204
|
-
|
|
40205
|
-
|
|
40606
|
+
_this.filteringLogic = exports.FilteringLogic.Or;
|
|
40607
|
+
_this.stringFilters = IgxStringFilteringOperand;
|
|
40608
|
+
_this.booleanFilters = IgxBooleanFilteringOperand;
|
|
40609
|
+
_this._prevInputValue = '';
|
|
40610
|
+
_this.comboAPI.register(_this);
|
|
40611
|
+
return _this;
|
|
40612
|
+
}
|
|
40613
|
+
Object.defineProperty(IgxComboComponent.prototype, "inputEmpty", {
|
|
40206
40614
|
/**
|
|
40207
|
-
*
|
|
40208
|
-
*
|
|
40209
|
-
* ```typescript
|
|
40210
|
-
* // get
|
|
40211
|
-
* let comboValue = this.combo.value;
|
|
40212
|
-
* ```
|
|
40615
|
+
* @hidden @internal
|
|
40213
40616
|
*/
|
|
40214
40617
|
get: function () {
|
|
40215
|
-
return this.
|
|
40618
|
+
return !this.value && !this.placeholder;
|
|
40216
40619
|
},
|
|
40217
40620
|
enumerable: false,
|
|
40218
40621
|
configurable: true
|
|
40219
40622
|
});
|
|
40220
40623
|
Object.defineProperty(IgxComboComponent.prototype, "filteredData", {
|
|
40221
|
-
/**
|
|
40222
|
-
* @hidden @internal
|
|
40223
|
-
*/
|
|
40624
|
+
/** @hidden @internal */
|
|
40224
40625
|
get: function () {
|
|
40225
40626
|
return this.filterable ? this._filteredData : this.data;
|
|
40226
40627
|
},
|
|
40227
|
-
/**
|
|
40228
|
-
* @hidden @internal
|
|
40229
|
-
*/
|
|
40628
|
+
/** @hidden @internal */
|
|
40230
40629
|
set: function (val) {
|
|
40231
40630
|
this._filteredData = this.groupKey ? (val || []).filter(function (e) { return e.isHeader !== true; }) : val;
|
|
40232
40631
|
this.checkMatch();
|
|
@@ -40234,10 +40633,19 @@
|
|
|
40234
40633
|
enumerable: false,
|
|
40235
40634
|
configurable: true
|
|
40236
40635
|
});
|
|
40636
|
+
Object.defineProperty(IgxComboComponent.prototype, "displaySearchInput", {
|
|
40637
|
+
/** @hidden @internal */
|
|
40638
|
+
get: function () {
|
|
40639
|
+
return this.filterable || this.allowCustomValues;
|
|
40640
|
+
},
|
|
40641
|
+
enumerable: false,
|
|
40642
|
+
configurable: true
|
|
40643
|
+
});
|
|
40237
40644
|
/**
|
|
40238
40645
|
* @hidden @internal
|
|
40239
40646
|
*/
|
|
40240
40647
|
IgxComboComponent.prototype.handleKeyUp = function (event) {
|
|
40648
|
+
// TODO: use PlatformUtil for keyboard navigation
|
|
40241
40649
|
if (event.key === 'ArrowDown' || event.key === 'Down') {
|
|
40242
40650
|
this.dropdown.focusedItem = this.dropdown.items[0];
|
|
40243
40651
|
this.dropdownContainer.nativeElement.focus();
|
|
@@ -40246,80 +40654,6 @@
|
|
|
40246
40654
|
this.toggle();
|
|
40247
40655
|
}
|
|
40248
40656
|
};
|
|
40249
|
-
/**
|
|
40250
|
-
* @hidden @internal
|
|
40251
|
-
*/
|
|
40252
|
-
IgxComboComponent.prototype.handleKeyDown = function (event) {
|
|
40253
|
-
if (event.key === 'ArrowUp' || event.key === 'Up') {
|
|
40254
|
-
event.preventDefault();
|
|
40255
|
-
event.stopPropagation();
|
|
40256
|
-
this.close();
|
|
40257
|
-
}
|
|
40258
|
-
};
|
|
40259
|
-
/**
|
|
40260
|
-
* @hidden @internal
|
|
40261
|
-
*/
|
|
40262
|
-
IgxComboComponent.prototype.handleInputChange = function (event) {
|
|
40263
|
-
if (event !== undefined) {
|
|
40264
|
-
var args = {
|
|
40265
|
-
searchText: event,
|
|
40266
|
-
owner: this,
|
|
40267
|
-
cancel: false
|
|
40268
|
-
};
|
|
40269
|
-
this.searchInputUpdate.emit(args);
|
|
40270
|
-
if (args.cancel) {
|
|
40271
|
-
this.filterValue = null;
|
|
40272
|
-
}
|
|
40273
|
-
}
|
|
40274
|
-
this.checkMatch();
|
|
40275
|
-
};
|
|
40276
|
-
Object.defineProperty(IgxComboComponent.prototype, "dataType", {
|
|
40277
|
-
/**
|
|
40278
|
-
* @hidden @internal
|
|
40279
|
-
*/
|
|
40280
|
-
get: function () {
|
|
40281
|
-
if (this.displayKey) {
|
|
40282
|
-
return DataTypes.COMPLEX;
|
|
40283
|
-
}
|
|
40284
|
-
return DataTypes.PRIMITIVE;
|
|
40285
|
-
},
|
|
40286
|
-
enumerable: false,
|
|
40287
|
-
configurable: true
|
|
40288
|
-
});
|
|
40289
|
-
Object.defineProperty(IgxComboComponent.prototype, "isRemote", {
|
|
40290
|
-
/**
|
|
40291
|
-
* @hidden @internal
|
|
40292
|
-
*/
|
|
40293
|
-
get: function () {
|
|
40294
|
-
return this.totalItemCount > 0 &&
|
|
40295
|
-
this.valueKey &&
|
|
40296
|
-
this.dataType === DataTypes.COMPLEX;
|
|
40297
|
-
},
|
|
40298
|
-
enumerable: false,
|
|
40299
|
-
configurable: true
|
|
40300
|
-
});
|
|
40301
|
-
/**
|
|
40302
|
-
* Returns if the specified itemID is selected
|
|
40303
|
-
*
|
|
40304
|
-
* @hidden
|
|
40305
|
-
* @internal
|
|
40306
|
-
*/
|
|
40307
|
-
IgxComboComponent.prototype.isItemSelected = function (item) {
|
|
40308
|
-
return this.selection.is_item_selected(this.id, item);
|
|
40309
|
-
};
|
|
40310
|
-
/**
|
|
40311
|
-
* Triggers change detection on the combo view
|
|
40312
|
-
*/
|
|
40313
|
-
IgxComboComponent.prototype.triggerCheck = function () {
|
|
40314
|
-
this.cdr.detectChanges();
|
|
40315
|
-
};
|
|
40316
|
-
/**
|
|
40317
|
-
* @hidden @internal
|
|
40318
|
-
*/
|
|
40319
|
-
IgxComboComponent.prototype.isAddButtonVisible = function () {
|
|
40320
|
-
// This should always return a boolean value. If this.searchValue was '', it returns '' instead of false;
|
|
40321
|
-
return this.searchValue !== '' && this.customValueFlag;
|
|
40322
|
-
};
|
|
40323
40657
|
/**
|
|
40324
40658
|
* @hidden @internal
|
|
40325
40659
|
*/
|
|
@@ -40331,145 +40665,15 @@
|
|
|
40331
40665
|
this.deselectAllItems();
|
|
40332
40666
|
}
|
|
40333
40667
|
};
|
|
40334
|
-
/**
|
|
40335
|
-
* @hidden @internal
|
|
40336
|
-
*/
|
|
40337
|
-
IgxComboComponent.prototype.addItemToCollection = function () {
|
|
40338
|
-
var _a, _b;
|
|
40339
|
-
if (!this.searchValue) {
|
|
40340
|
-
return;
|
|
40341
|
-
}
|
|
40342
|
-
var newValue = this.searchValue.trim();
|
|
40343
|
-
var addedItem = this.displayKey ? (_a = {},
|
|
40344
|
-
_a[this.valueKey] = newValue,
|
|
40345
|
-
_a[this.displayKey] = newValue,
|
|
40346
|
-
_a) : newValue;
|
|
40347
|
-
if (this.groupKey) {
|
|
40348
|
-
Object.assign(addedItem, (_b = {}, _b[this.groupKey] = this.defaultFallbackGroup, _b));
|
|
40349
|
-
}
|
|
40350
|
-
// expose shallow copy instead of this.data in event args so this.data can't be mutated
|
|
40351
|
-
var oldCollection = __spreadArray([], __read(this.data));
|
|
40352
|
-
var newCollection = __spreadArray(__spreadArray([], __read(this.data)), [addedItem]);
|
|
40353
|
-
var args = {
|
|
40354
|
-
oldCollection: oldCollection,
|
|
40355
|
-
addedItem: addedItem,
|
|
40356
|
-
newCollection: newCollection,
|
|
40357
|
-
owner: this, cancel: false
|
|
40358
|
-
};
|
|
40359
|
-
this.addition.emit(args);
|
|
40360
|
-
if (args.cancel) {
|
|
40361
|
-
return;
|
|
40362
|
-
}
|
|
40363
|
-
this.data.push(args.addedItem);
|
|
40364
|
-
// trigger re-render
|
|
40365
|
-
this.data = cloneArray(this.data);
|
|
40366
|
-
this.selectItems(this.valueKey !== null && this.valueKey !== undefined ?
|
|
40367
|
-
[args.addedItem[this.valueKey]] : [args.addedItem], false);
|
|
40368
|
-
this.customValueFlag = false;
|
|
40369
|
-
this.searchInput.nativeElement.focus();
|
|
40370
|
-
this.dropdown.focusedItem = null;
|
|
40371
|
-
this.virtDir.scrollTo(0);
|
|
40372
|
-
};
|
|
40373
|
-
/**
|
|
40374
|
-
* @hidden @internal
|
|
40375
|
-
*/
|
|
40376
|
-
IgxComboComponent.prototype.focusSearchInput = function (opening) {
|
|
40377
|
-
if (this.displaySearchInput && this.searchInput) {
|
|
40378
|
-
this.searchInput.nativeElement.focus();
|
|
40379
|
-
}
|
|
40380
|
-
else {
|
|
40381
|
-
if (opening) {
|
|
40382
|
-
this.dropdownContainer.nativeElement.focus();
|
|
40383
|
-
}
|
|
40384
|
-
else {
|
|
40385
|
-
this.comboInput.nativeElement.focus();
|
|
40386
|
-
this.toggle();
|
|
40387
|
-
}
|
|
40388
|
-
}
|
|
40389
|
-
};
|
|
40390
|
-
/**
|
|
40391
|
-
* @hidden @internal
|
|
40392
|
-
*/
|
|
40393
|
-
IgxComboComponent.prototype.onBlur = function () {
|
|
40394
|
-
if (this.collapsed) {
|
|
40395
|
-
this._onTouchedCallback();
|
|
40396
|
-
if (this.ngControl && this.ngControl.invalid) {
|
|
40397
|
-
this.valid = exports.IgxComboState.INVALID;
|
|
40398
|
-
}
|
|
40399
|
-
else {
|
|
40400
|
-
this.valid = exports.IgxComboState.INITIAL;
|
|
40401
|
-
}
|
|
40402
|
-
}
|
|
40403
|
-
};
|
|
40404
|
-
/**
|
|
40405
|
-
* @hidden @internal
|
|
40406
|
-
*/
|
|
40407
|
-
IgxComboComponent.prototype.ngOnInit = function () {
|
|
40408
|
-
this.ngControl = this._injector.get(forms.NgControl, null);
|
|
40409
|
-
var targetElement = this.elementRef.nativeElement;
|
|
40410
|
-
this._overlaySettings = {
|
|
40411
|
-
target: targetElement,
|
|
40412
|
-
scrollStrategy: new AbsoluteScrollStrategy(),
|
|
40413
|
-
positionStrategy: new AutoPositionStrategy(),
|
|
40414
|
-
modal: false,
|
|
40415
|
-
closeOnOutsideClick: true,
|
|
40416
|
-
excludeFromOutsideClick: [targetElement]
|
|
40417
|
-
};
|
|
40418
|
-
this.selection.set(this.id, new Set());
|
|
40419
|
-
this._iconService.addSvgIconFromText(materialIconsExtended.caseSensitive.name, materialIconsExtended.caseSensitive.value, 'imx-icons');
|
|
40420
|
-
};
|
|
40421
|
-
/**
|
|
40422
|
-
* @hidden @internal
|
|
40423
|
-
*/
|
|
40424
|
-
IgxComboComponent.prototype.ngAfterViewInit = function () {
|
|
40425
|
-
var _this = this;
|
|
40426
|
-
this.filteredData = __spreadArray([], __read(this.data));
|
|
40427
|
-
if (this.ngControl) {
|
|
40428
|
-
this.ngControl.statusChanges.pipe(operators.takeUntil(this.destroy$)).subscribe(this.onStatusChanged);
|
|
40429
|
-
this.manageRequiredAsterisk();
|
|
40430
|
-
this.cdr.detectChanges();
|
|
40431
|
-
}
|
|
40432
|
-
this.virtDir.chunkPreload.pipe(operators.takeUntil(this.destroy$)).subscribe(function (e) {
|
|
40433
|
-
var eventArgs = Object.assign({}, e, { owner: _this });
|
|
40434
|
-
_this.dataPreLoad.emit(eventArgs);
|
|
40435
|
-
});
|
|
40436
|
-
};
|
|
40437
|
-
/**
|
|
40438
|
-
* @hidden @internal
|
|
40439
|
-
*/
|
|
40440
|
-
IgxComboComponent.prototype.ngOnDestroy = function () {
|
|
40441
|
-
this.destroy$.next();
|
|
40442
|
-
this.destroy$.complete();
|
|
40443
|
-
this.comboAPI.clear();
|
|
40444
|
-
this.selection.clear(this.id);
|
|
40445
|
-
};
|
|
40446
40668
|
/**
|
|
40447
40669
|
* @hidden @internal
|
|
40448
40670
|
*/
|
|
40449
40671
|
IgxComboComponent.prototype.writeValue = function (value) {
|
|
40450
40672
|
var selection = Array.isArray(value) ? value : [];
|
|
40451
|
-
var oldSelection = this.
|
|
40452
|
-
this.
|
|
40673
|
+
var oldSelection = this.selection;
|
|
40674
|
+
this.selectionService.select_items(this.id, selection, true);
|
|
40453
40675
|
this.cdr.markForCheck();
|
|
40454
|
-
this._value = this.createDisplayText(this.
|
|
40455
|
-
};
|
|
40456
|
-
/**
|
|
40457
|
-
* @hidden @internal
|
|
40458
|
-
*/
|
|
40459
|
-
IgxComboComponent.prototype.registerOnChange = function (fn) {
|
|
40460
|
-
this._onChangeCallback = fn;
|
|
40461
|
-
};
|
|
40462
|
-
/**
|
|
40463
|
-
* @hidden @internal
|
|
40464
|
-
*/
|
|
40465
|
-
IgxComboComponent.prototype.registerOnTouched = function (fn) {
|
|
40466
|
-
this._onTouchedCallback = fn;
|
|
40467
|
-
};
|
|
40468
|
-
/**
|
|
40469
|
-
* @hidden @internal
|
|
40470
|
-
*/
|
|
40471
|
-
IgxComboComponent.prototype.setDisabledState = function (isDisabled) {
|
|
40472
|
-
this.disabled = isDisabled;
|
|
40676
|
+
this._value = this.createDisplayText(this.selection, oldSelection);
|
|
40473
40677
|
};
|
|
40474
40678
|
/**
|
|
40475
40679
|
* @hidden
|
|
@@ -40477,23 +40681,6 @@
|
|
|
40477
40681
|
IgxComboComponent.prototype.getEditElement = function () {
|
|
40478
40682
|
return this.comboInput.nativeElement;
|
|
40479
40683
|
};
|
|
40480
|
-
Object.defineProperty(IgxComboComponent.prototype, "template", {
|
|
40481
|
-
/**
|
|
40482
|
-
* @hidden @internal
|
|
40483
|
-
*/
|
|
40484
|
-
get: function () {
|
|
40485
|
-
this._dataType = this.dataType;
|
|
40486
|
-
if (this.itemTemplate) {
|
|
40487
|
-
return this.itemTemplate;
|
|
40488
|
-
}
|
|
40489
|
-
if (this._dataType === DataTypes.COMPLEX) {
|
|
40490
|
-
return this.complexTemplate;
|
|
40491
|
-
}
|
|
40492
|
-
return this.primitiveTemplate;
|
|
40493
|
-
},
|
|
40494
|
-
enumerable: false,
|
|
40495
|
-
configurable: true
|
|
40496
|
-
});
|
|
40497
40684
|
Object.defineProperty(IgxComboComponent.prototype, "context", {
|
|
40498
40685
|
/**
|
|
40499
40686
|
* @hidden @internal
|
|
@@ -40522,79 +40709,18 @@
|
|
|
40522
40709
|
}
|
|
40523
40710
|
event.stopPropagation();
|
|
40524
40711
|
};
|
|
40525
|
-
/**
|
|
40526
|
-
* A method that opens/closes the combo.
|
|
40527
|
-
*
|
|
40528
|
-
* ```html
|
|
40529
|
-
* <button (click)="combo.toggle()">Toggle Combo</button>
|
|
40530
|
-
* <igx-combo #combo></igx-combo>
|
|
40531
|
-
* ```
|
|
40532
|
-
*/
|
|
40533
|
-
IgxComboComponent.prototype.toggle = function () {
|
|
40534
|
-
var overlaySettings = Object.assign({}, this._overlaySettings, this.overlaySettings);
|
|
40535
|
-
this.dropdown.toggle(overlaySettings);
|
|
40536
|
-
};
|
|
40537
|
-
/**
|
|
40538
|
-
* A method that opens the combo.
|
|
40539
|
-
*
|
|
40540
|
-
* ```html
|
|
40541
|
-
* <button (click)="combo.open()">Open Combo</button>
|
|
40542
|
-
* <igx-combo #combo></igx-combo>
|
|
40543
|
-
* ```
|
|
40544
|
-
*/
|
|
40545
|
-
IgxComboComponent.prototype.open = function () {
|
|
40546
|
-
var overlaySettings = Object.assign({}, this._overlaySettings, this.overlaySettings);
|
|
40547
|
-
this.dropdown.open(overlaySettings);
|
|
40548
|
-
};
|
|
40549
|
-
/**
|
|
40550
|
-
* A method that closes the combo.
|
|
40551
|
-
*
|
|
40552
|
-
* ```html
|
|
40553
|
-
* <button (click)="combo.close()">Close Combo</button>
|
|
40554
|
-
* <igx-combo #combo></igx-combo>
|
|
40555
|
-
* ```
|
|
40556
|
-
*/
|
|
40557
|
-
IgxComboComponent.prototype.close = function () {
|
|
40558
|
-
this.dropdown.close();
|
|
40559
|
-
};
|
|
40560
|
-
Object.defineProperty(IgxComboComponent.prototype, "collapsed", {
|
|
40561
|
-
/**
|
|
40562
|
-
* Gets drop down state.
|
|
40563
|
-
*
|
|
40564
|
-
* ```typescript
|
|
40565
|
-
* let state = this.combo.collapsed;
|
|
40566
|
-
* ```
|
|
40567
|
-
*/
|
|
40568
|
-
get: function () {
|
|
40569
|
-
return this.dropdown.collapsed;
|
|
40570
|
-
},
|
|
40571
|
-
enumerable: false,
|
|
40572
|
-
configurable: true
|
|
40573
|
-
});
|
|
40574
|
-
/**
|
|
40575
|
-
* Get current selection state
|
|
40576
|
-
*
|
|
40577
|
-
* @returns Array of selected items
|
|
40578
|
-
* ```typescript
|
|
40579
|
-
* let selectedItems = this.combo.selectedItems();
|
|
40580
|
-
* ```
|
|
40581
|
-
*/
|
|
40582
|
-
IgxComboComponent.prototype.selectedItems = function () {
|
|
40583
|
-
var items = Array.from(this.selection.get(this.id));
|
|
40584
|
-
return items;
|
|
40585
|
-
};
|
|
40586
40712
|
/**
|
|
40587
40713
|
* Select defined items
|
|
40588
40714
|
*
|
|
40589
40715
|
* @param newItems new items to be selected
|
|
40590
40716
|
* @param clearCurrentSelection if true clear previous selected items
|
|
40591
40717
|
* ```typescript
|
|
40592
|
-
* this.combo.
|
|
40718
|
+
* this.combo.select(["New York", "New Jersey"]);
|
|
40593
40719
|
* ```
|
|
40594
40720
|
*/
|
|
40595
|
-
IgxComboComponent.prototype.
|
|
40721
|
+
IgxComboComponent.prototype.select = function (newItems, clearCurrentSelection, event) {
|
|
40596
40722
|
if (newItems) {
|
|
40597
|
-
var newSelection = this.
|
|
40723
|
+
var newSelection = this.selectionService.add_items(this.id, newItems, clearCurrentSelection);
|
|
40598
40724
|
this.setSelection(newSelection, event);
|
|
40599
40725
|
}
|
|
40600
40726
|
};
|
|
@@ -40603,12 +40729,12 @@
|
|
|
40603
40729
|
*
|
|
40604
40730
|
* @param items items to deselected
|
|
40605
40731
|
* ```typescript
|
|
40606
|
-
* this.combo.
|
|
40732
|
+
* this.combo.deselect(["New York", "New Jersey"]);
|
|
40607
40733
|
* ```
|
|
40608
40734
|
*/
|
|
40609
|
-
IgxComboComponent.prototype.
|
|
40735
|
+
IgxComboComponent.prototype.deselect = function (items, event) {
|
|
40610
40736
|
if (items) {
|
|
40611
|
-
var newSelection = this.
|
|
40737
|
+
var newSelection = this.selectionService.delete_items(this.id, items);
|
|
40612
40738
|
this.setSelection(newSelection, event);
|
|
40613
40739
|
}
|
|
40614
40740
|
};
|
|
@@ -40621,8 +40747,8 @@
|
|
|
40621
40747
|
* ```
|
|
40622
40748
|
*/
|
|
40623
40749
|
IgxComboComponent.prototype.selectAllItems = function (ignoreFilter, event) {
|
|
40624
|
-
var allVisible = this.
|
|
40625
|
-
var newSelection = this.
|
|
40750
|
+
var allVisible = this.selectionService.get_all_ids(ignoreFilter ? this.data : this.filteredData, this.valueKey);
|
|
40751
|
+
var newSelection = this.selectionService.add_items(this.id, allVisible);
|
|
40626
40752
|
this.setSelection(newSelection, event);
|
|
40627
40753
|
};
|
|
40628
40754
|
/**
|
|
@@ -40634,9 +40760,9 @@
|
|
|
40634
40760
|
* ```
|
|
40635
40761
|
*/
|
|
40636
40762
|
IgxComboComponent.prototype.deselectAllItems = function (ignoreFilter, event) {
|
|
40637
|
-
var newSelection = this.
|
|
40763
|
+
var newSelection = this.selectionService.get_empty();
|
|
40638
40764
|
if (this.filteredData.length !== this.data.length && !ignoreFilter) {
|
|
40639
|
-
newSelection = this.
|
|
40765
|
+
newSelection = this.selectionService.delete_items(this.id, this.selectionService.get_all_ids(this.filteredData, this.valueKey));
|
|
40640
40766
|
}
|
|
40641
40767
|
this.setSelection(newSelection, event);
|
|
40642
40768
|
};
|
|
@@ -40665,26 +40791,19 @@
|
|
|
40665
40791
|
return;
|
|
40666
40792
|
}
|
|
40667
40793
|
if (select) {
|
|
40668
|
-
this.
|
|
40794
|
+
this.select([itemID], false, event);
|
|
40669
40795
|
}
|
|
40670
40796
|
else {
|
|
40671
|
-
this.
|
|
40797
|
+
this.deselect([itemID], event);
|
|
40672
40798
|
}
|
|
40673
40799
|
};
|
|
40674
|
-
/**
|
|
40675
|
-
* Event handlers
|
|
40676
|
-
*
|
|
40677
|
-
* @hidden
|
|
40678
|
-
* @internal
|
|
40679
|
-
*/
|
|
40680
|
-
IgxComboComponent.prototype.handleOpening = function (e) {
|
|
40681
|
-
var args = { owner: this, event: e.event, cancel: e.cancel };
|
|
40682
|
-
this.opening.emit(args);
|
|
40683
|
-
e.cancel = args.cancel;
|
|
40684
|
-
};
|
|
40685
40800
|
/**
|
|
40686
40801
|
* @hidden @internal
|
|
40687
40802
|
*/
|
|
40803
|
+
IgxComboComponent.prototype.toggleCaseSensitive = function () {
|
|
40804
|
+
this.filteringOptions = { caseSensitive: !this.filteringOptions.caseSensitive };
|
|
40805
|
+
};
|
|
40806
|
+
/** @hidden @internal */
|
|
40688
40807
|
IgxComboComponent.prototype.handleOpened = function () {
|
|
40689
40808
|
this.triggerCheck();
|
|
40690
40809
|
// Disabling focus of the search input should happen only when drop down opens.
|
|
@@ -40698,36 +40817,26 @@
|
|
|
40698
40817
|
}
|
|
40699
40818
|
this.opened.emit({ owner: this });
|
|
40700
40819
|
};
|
|
40701
|
-
/**
|
|
40702
|
-
|
|
40703
|
-
|
|
40704
|
-
|
|
40705
|
-
|
|
40706
|
-
|
|
40707
|
-
|
|
40708
|
-
|
|
40709
|
-
|
|
40820
|
+
/** @hidden @internal */
|
|
40821
|
+
IgxComboComponent.prototype.focusSearchInput = function (opening) {
|
|
40822
|
+
if (this.displaySearchInput && this.searchInput) {
|
|
40823
|
+
this.searchInput.nativeElement.focus();
|
|
40824
|
+
}
|
|
40825
|
+
else {
|
|
40826
|
+
if (opening) {
|
|
40827
|
+
this.dropdownContainer.nativeElement.focus();
|
|
40828
|
+
}
|
|
40829
|
+
else {
|
|
40830
|
+
this.comboInput.nativeElement.focus();
|
|
40831
|
+
this.toggle();
|
|
40832
|
+
}
|
|
40710
40833
|
}
|
|
40711
|
-
this.searchValue = '';
|
|
40712
|
-
this.comboInput.nativeElement.focus();
|
|
40713
|
-
};
|
|
40714
|
-
/**
|
|
40715
|
-
* @hidden @internal
|
|
40716
|
-
*/
|
|
40717
|
-
IgxComboComponent.prototype.handleClosed = function () {
|
|
40718
|
-
this.closed.emit({ owner: this });
|
|
40719
|
-
};
|
|
40720
|
-
/**
|
|
40721
|
-
* @hidden @internal
|
|
40722
|
-
*/
|
|
40723
|
-
IgxComboComponent.prototype.toggleCaseSensitive = function () {
|
|
40724
|
-
this.filteringOptions = { caseSensitive: !this.filteringOptions.caseSensitive };
|
|
40725
40834
|
};
|
|
40726
40835
|
IgxComboComponent.prototype.setSelection = function (newSelection, event) {
|
|
40727
|
-
var removed = diffInSets(this.
|
|
40728
|
-
var added = diffInSets(newSelection, this.
|
|
40836
|
+
var removed = diffInSets(this.selectionService.get(this.id), newSelection);
|
|
40837
|
+
var added = diffInSets(newSelection, this.selectionService.get(this.id));
|
|
40729
40838
|
var newSelectionAsArray = Array.from(newSelection);
|
|
40730
|
-
var oldSelectionAsArray = Array.from(this.
|
|
40839
|
+
var oldSelectionAsArray = Array.from(this.selectionService.get(this.id) || []);
|
|
40731
40840
|
var displayText = this.createDisplayText(newSelectionAsArray, oldSelectionAsArray);
|
|
40732
40841
|
var args = {
|
|
40733
40842
|
newSelection: newSelectionAsArray,
|
|
@@ -40741,7 +40850,7 @@
|
|
|
40741
40850
|
};
|
|
40742
40851
|
this.selectionChanging.emit(args);
|
|
40743
40852
|
if (!args.cancel) {
|
|
40744
|
-
this.
|
|
40853
|
+
this.selectionService.select_items(this.id, args.newSelection, true);
|
|
40745
40854
|
if (displayText !== args.displayText) {
|
|
40746
40855
|
this._value = args.displayText;
|
|
40747
40856
|
}
|
|
@@ -40751,71 +40860,10 @@
|
|
|
40751
40860
|
this._onChangeCallback(args.newSelection);
|
|
40752
40861
|
}
|
|
40753
40862
|
};
|
|
40754
|
-
IgxComboComponent.prototype.
|
|
40755
|
-
|
|
40756
|
-
|
|
40757
|
-
|
|
40758
|
-
this.inputGroup.isRequired = error && error.required;
|
|
40759
|
-
}
|
|
40760
|
-
};
|
|
40761
|
-
/** Contains key-value pairs of the selected valueKeys and their resp. displayKeys */
|
|
40762
|
-
IgxComboComponent.prototype.registerRemoteEntries = function (ids, add) {
|
|
40763
|
-
var e_1, _a, e_2, _b;
|
|
40764
|
-
if (add === void 0) { add = true; }
|
|
40765
|
-
if (add) {
|
|
40766
|
-
var selection = this.getValueDisplayPairs(ids);
|
|
40767
|
-
try {
|
|
40768
|
-
for (var selection_1 = __values(selection), selection_1_1 = selection_1.next(); !selection_1_1.done; selection_1_1 = selection_1.next()) {
|
|
40769
|
-
var entry = selection_1_1.value;
|
|
40770
|
-
this._remoteSelection[entry[this.valueKey]] = entry[this.displayKey];
|
|
40771
|
-
}
|
|
40772
|
-
}
|
|
40773
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
40774
|
-
finally {
|
|
40775
|
-
try {
|
|
40776
|
-
if (selection_1_1 && !selection_1_1.done && (_a = selection_1.return)) _a.call(selection_1);
|
|
40777
|
-
}
|
|
40778
|
-
finally { if (e_1) throw e_1.error; }
|
|
40779
|
-
}
|
|
40780
|
-
}
|
|
40781
|
-
else {
|
|
40782
|
-
try {
|
|
40783
|
-
for (var ids_1 = __values(ids), ids_1_1 = ids_1.next(); !ids_1_1.done; ids_1_1 = ids_1.next()) {
|
|
40784
|
-
var entry = ids_1_1.value;
|
|
40785
|
-
delete this._remoteSelection[entry];
|
|
40786
|
-
}
|
|
40787
|
-
}
|
|
40788
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
40789
|
-
finally {
|
|
40790
|
-
try {
|
|
40791
|
-
if (ids_1_1 && !ids_1_1.done && (_b = ids_1.return)) _b.call(ids_1);
|
|
40792
|
-
}
|
|
40793
|
-
finally { if (e_2) throw e_2.error; }
|
|
40794
|
-
}
|
|
40795
|
-
}
|
|
40796
|
-
};
|
|
40797
|
-
/**
|
|
40798
|
-
* For `id: any[]` returns a mapped `{ [combo.valueKey]: any, [combo.displayKey]: any }[]`
|
|
40799
|
-
*/
|
|
40800
|
-
IgxComboComponent.prototype.getValueDisplayPairs = function (ids) {
|
|
40801
|
-
var _this = this;
|
|
40802
|
-
return this.data.filter(function (entry) { return ids.indexOf(entry[_this.valueKey]) > -1; }).map(function (e) {
|
|
40803
|
-
var _a;
|
|
40804
|
-
return (_a = {},
|
|
40805
|
-
_a[_this.valueKey] = e[_this.valueKey],
|
|
40806
|
-
_a[_this.displayKey] = e[_this.displayKey],
|
|
40807
|
-
_a);
|
|
40808
|
-
});
|
|
40809
|
-
};
|
|
40810
|
-
IgxComboComponent.prototype.checkMatch = function () {
|
|
40811
|
-
var _this = this;
|
|
40812
|
-
var displayKey = this.displayKey;
|
|
40813
|
-
var matchFn = function (e) {
|
|
40814
|
-
var value = displayKey ? e[displayKey] : e;
|
|
40815
|
-
return value.toString().toLowerCase() === _this.searchValue.trim().toLowerCase();
|
|
40816
|
-
};
|
|
40817
|
-
var itemMatch = this.filteredData.some(matchFn);
|
|
40818
|
-
this.customValueFlag = this.allowCustomValues && !itemMatch;
|
|
40863
|
+
IgxComboComponent.prototype.createDisplayText = function (newSelection, oldSelection) {
|
|
40864
|
+
return this.isRemote
|
|
40865
|
+
? this.getRemoteSelection(newSelection, oldSelection)
|
|
40866
|
+
: this.concatDisplayText(newSelection);
|
|
40819
40867
|
};
|
|
40820
40868
|
/** Returns a string that should be populated in the combo's text box */
|
|
40821
40869
|
IgxComboComponent.prototype.concatDisplayText = function (selection) {
|
|
@@ -40825,47 +40873,12 @@
|
|
|
40825
40873
|
selection.join(', ');
|
|
40826
40874
|
return value;
|
|
40827
40875
|
};
|
|
40828
|
-
/**
|
|
40829
|
-
* Constructs the combo display value
|
|
40830
|
-
* If remote, caches the key displayText
|
|
40831
|
-
* If not, just combine the object.displayKeys
|
|
40832
|
-
*/
|
|
40833
|
-
IgxComboComponent.prototype.createDisplayText = function (newSelection, oldSelection) {
|
|
40834
|
-
var _this = this;
|
|
40835
|
-
var value = '';
|
|
40836
|
-
if (this.isRemote) {
|
|
40837
|
-
if (newSelection.length) {
|
|
40838
|
-
var removedItems = oldSelection.filter(function (e) { return newSelection.indexOf(e) < 0; });
|
|
40839
|
-
var addedItems = newSelection.filter(function (e) { return oldSelection.indexOf(e) < 0; });
|
|
40840
|
-
this.registerRemoteEntries(addedItems);
|
|
40841
|
-
this.registerRemoteEntries(removedItems, false);
|
|
40842
|
-
value = Object.keys(this._remoteSelection).map(function (e) { return _this._remoteSelection[e]; }).join(', ');
|
|
40843
|
-
}
|
|
40844
|
-
else {
|
|
40845
|
-
// If new selection is empty, clear all items
|
|
40846
|
-
this.registerRemoteEntries(oldSelection, false);
|
|
40847
|
-
}
|
|
40848
|
-
}
|
|
40849
|
-
else {
|
|
40850
|
-
value = this.concatDisplayText(newSelection);
|
|
40851
|
-
}
|
|
40852
|
-
return value;
|
|
40853
|
-
};
|
|
40854
|
-
/** if there is a valueKey - map the keys to data items, else - just return the keys */
|
|
40855
|
-
IgxComboComponent.prototype.convertKeysToItems = function (keys) {
|
|
40856
|
-
var _this = this;
|
|
40857
|
-
if (this.comboAPI.valueKey === null) {
|
|
40858
|
-
return keys;
|
|
40859
|
-
}
|
|
40860
|
-
// map keys vs. filter data to retain the order of the selected items
|
|
40861
|
-
return keys.map(function (key) { return _this.data.find(function (entry) { return entry[_this.valueKey] === key; }); }).filter(function (e) { return e !== undefined; });
|
|
40862
|
-
};
|
|
40863
40876
|
return IgxComboComponent;
|
|
40864
|
-
}(
|
|
40877
|
+
}(IgxComboBaseDirective));
|
|
40865
40878
|
IgxComboComponent.decorators = [
|
|
40866
40879
|
{ type: i0.Component, args: [{
|
|
40867
40880
|
selector: 'igx-combo',
|
|
40868
|
-
template: "<igx-input-group #inputGroup [displayDensity]=\"displayDensity\" [type]=\"type\" (click)=\"
|
|
40881
|
+
template: "<igx-input-group #inputGroup [displayDensity]=\"displayDensity\" [type]=\"type\" (click)=\"onClick($event)\">\n <ng-container ngProjectAs=\"[igxLabel]\">\n <ng-content select=\"[igxLabel]\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"igx-prefix\">\n <ng-content select=\"igx-prefix\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"igx-hint, [igxHint]\">\n <ng-content select=\"igx-hint, [igxHint]\"></ng-content>\n </ng-container>\n <input igxInput #comboInput name=\"comboInput\" type=\"text\" [value]=\"value\" readonly [attr.placeholder]=\"placeholder\"\n [disabled]=\"disabled\" (blur)=\"onBlur()\" />\n <ng-container ngProjectAs=\"igx-suffix\">\n <ng-content select=\"igx-suffix\"></ng-content>\n </ng-container>\n <igx-suffix *ngIf=\"value.length\" aria-label=\"Clear Selection\" class=\"igx-combo__clear-button\"\n (click)=\"handleClearItems($event)\">\n <ng-container *ngIf=\"clearIconTemplate\">\n <ng-container *ngTemplateOutlet=\"clearIconTemplate\"></ng-container>\n </ng-container>\n <igx-icon *ngIf=\"!clearIconTemplate\">\n clear\n </igx-icon>\n </igx-suffix>\n <igx-suffix class=\"igx-combo__toggle-button\">\n <ng-container *ngIf=\"toggleIconTemplate\">\n <ng-container *ngTemplateOutlet=\"toggleIconTemplate; context: {$implicit: this.collapsed}\"></ng-container>\n </ng-container>\n <igx-icon *ngIf=\"!toggleIconTemplate\">\n {{ dropdown.collapsed ? 'arrow_drop_down' : 'arrow_drop_up'}}\n </igx-icon>\n </igx-suffix>\n</igx-input-group>\n<igx-combo-drop-down #igxComboDropDown class=\"igx-combo__drop-down\" [displayDensity]=\"displayDensity\"\n [width]=\"itemsWidth || '100%'\" (opening)=\"handleOpening($event)\" (closing)=\"handleClosing($event)\"\n (opened)=\"handleOpened()\" (closed)=\"handleClosed()\">\n <igx-input-group *ngIf=\"displaySearchInput\" [displayDensity]=\"displayDensity\" theme=\"material\" class=\"igx-combo__search\">\n <input class=\"igx-combo-input\" igxInput #searchInput name=\"searchInput\" autocomplete=\"off\" type=\"text\"\n [(ngModel)]=\"searchValue\" (ngModelChange)=\"handleInputChange($event)\" (keyup)=\"handleKeyUp($event)\"\n (keydown)=\"handleKeyDown($event)\" (focus)=\"dropdown.onBlur($event)\" [attr.placeholder]=\"searchPlaceholder\"\n aria-autocomplete=\"both\" [attr.aria-owns]=\"dropdown.id\" [attr.aria-labelledby]=\"ariaLabelledBy\" />\n <igx-suffix *ngIf=\"showSearchCaseIcon\">\n <igx-icon family=\"imx-icons\" name=\"case-sensitive\" [active]=\"filteringOptions.caseSensitive\"\n (click)=\"toggleCaseSensitive()\">\n </igx-icon>\n </igx-suffix>\n </igx-input-group>\n <ng-container *ngTemplateOutlet=\"headerTemplate\">\n </ng-container>\n <div #dropdownItemContainer class=\"igx-combo__content\" [style.overflow]=\"'hidden'\"\n [style.maxHeight.px]=\"itemsMaxHeight\" [igxDropDownItemNavigation]=\"dropdown\" (focus)=\"dropdown.onFocus()\"\n [tabindex]=\"dropdown.collapsed ? -1 : 0\" role=\"listbox\" [attr.id]=\"dropdown.id\">\n <igx-combo-item role=\"option\" [itemHeight]='itemHeight' *igxFor=\"let item of data\n | comboFiltering:filterValue:displayKey:filteringOptions:filterable\n | comboGrouping:groupKey:valueKey;\n index as rowIndex; containerSize: itemsMaxHeight; scrollOrientation: 'vertical'; itemSize: itemHeight\"\n [value]=\"item\" [isHeader]=\"item.isHeader\" [index]=\"rowIndex\">\n <ng-container *ngIf=\"item.isHeader\">\n <ng-container\n *ngTemplateOutlet=\"headerItemTemplate ? headerItemTemplate : headerItemBase;\n context: {$implicit: item, data: data, valueKey: valueKey, groupKey: groupKey, displayKey: displayKey}\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!item.isHeader\">\n <ng-container #listItem\n *ngTemplateOutlet=\"template; context: {$implicit: item, data: data, valueKey: valueKey, displayKey: displayKey};\">\n </ng-container>\n </ng-container>\n </igx-combo-item>\n </div>\n <div class=\"igx-combo__add\" *ngIf=\"filteredData.length === 0 || isAddButtonVisible()\">\n <div class=\"igx-combo__empty\" *ngIf=\"filteredData.length === 0\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate ? emptyTemplate : empty\">\n </ng-container>\n </div>\n <igx-combo-add-item [itemHeight]=\"itemHeight\" *ngIf=\"isAddButtonVisible()\"\n [tabindex]=\"dropdown.collapsed ? -1 : customValueFlag ? 1 : -1\" class=\"igx-combo__add-item\" role=\"button\"\n aria-label=\"Add Item\" [index]=\"virtualScrollContainer.igxForOf.length\">\n <ng-container *ngTemplateOutlet=\"addItemTemplate ? addItemTemplate : addItemDefault\">\n </ng-container>\n </igx-combo-add-item>\n </div>\n <ng-container *ngTemplateOutlet=\"footerTemplate\">\n </ng-container>\n</igx-combo-drop-down>\n<ng-template #complex let-display let-data=\"data\" let-key=\"displayKey\">\n {{display[key]}}\n</ng-template>\n<ng-template #primitive let-display>\n {{display}}\n</ng-template>\n<ng-template #empty>\n <span>The list is empty</span>\n</ng-template>\n<ng-template #addItemDefault let-control>\n <button igxButton=\"flat\" igxRipple>Add item</button>\n</ng-template>\n<ng-template #headerItemBase let-item let-key=\"valueKey\" let-groupKey=\"groupKey\">\n {{ item[key] }}\n</ng-template>\n",
|
|
40869
40882
|
providers: [
|
|
40870
40883
|
IgxComboAPIService,
|
|
40871
40884
|
{ provide: IGX_COMBO_COMPONENT, useExisting: IgxComboComponent },
|
|
@@ -40884,56 +40897,11 @@
|
|
|
40884
40897
|
{ type: i0.Injector, decorators: [{ type: i0.Optional }] }
|
|
40885
40898
|
]; };
|
|
40886
40899
|
IgxComboComponent.propDecorators = {
|
|
40887
|
-
overlaySettings: [{ type: i0.Input }],
|
|
40888
|
-
inputGroup: [{ type: i0.ViewChild, args: ['inputGroup', { read: IgxInputGroupComponent, static: true },] }],
|
|
40889
|
-
comboInput: [{ type: i0.ViewChild, args: ['comboInput', { read: IgxInputDirective, static: true },] }],
|
|
40890
|
-
dropdown: [{ type: i0.ViewChild, args: [IgxComboDropDownComponent, { read: IgxComboDropDownComponent, static: true },] }],
|
|
40891
|
-
searchInput: [{ type: i0.ViewChild, args: ['searchInput',] }],
|
|
40892
|
-
itemTemplate: [{ type: i0.ContentChild, args: [IgxComboItemDirective, { read: i0.TemplateRef },] }],
|
|
40893
|
-
headerTemplate: [{ type: i0.ContentChild, args: [IgxComboHeaderDirective, { read: i0.TemplateRef },] }],
|
|
40894
|
-
footerTemplate: [{ type: i0.ContentChild, args: [IgxComboFooterDirective, { read: i0.TemplateRef },] }],
|
|
40895
|
-
headerItemTemplate: [{ type: i0.ContentChild, args: [IgxComboHeaderItemDirective, { read: i0.TemplateRef },] }],
|
|
40896
|
-
addItemTemplate: [{ type: i0.ContentChild, args: [IgxComboAddItemDirective, { read: i0.TemplateRef },] }],
|
|
40897
|
-
emptyTemplate: [{ type: i0.ContentChild, args: [IgxComboEmptyDirective, { read: i0.TemplateRef },] }],
|
|
40898
|
-
toggleIconTemplate: [{ type: i0.ContentChild, args: [IgxComboToggleIconDirective, { read: i0.TemplateRef },] }],
|
|
40899
|
-
clearIconTemplate: [{ type: i0.ContentChild, args: [IgxComboClearIconDirective, { read: i0.TemplateRef },] }],
|
|
40900
|
-
virtualScrollContainer: [{ type: i0.ViewChild, args: [IgxForOfDirective, { static: true },] }],
|
|
40901
|
-
selectionChanging: [{ type: i0.Output }],
|
|
40902
|
-
opening: [{ type: i0.Output }],
|
|
40903
|
-
opened: [{ type: i0.Output }],
|
|
40904
|
-
closing: [{ type: i0.Output }],
|
|
40905
|
-
closed: [{ type: i0.Output }],
|
|
40906
|
-
addition: [{ type: i0.Output }],
|
|
40907
|
-
searchInputUpdate: [{ type: i0.Output }],
|
|
40908
|
-
dataPreLoad: [{ type: i0.Output }],
|
|
40909
|
-
id: [{ type: i0.HostBinding, args: ['attr.id',] }, { type: i0.Input }],
|
|
40910
|
-
width: [{ type: i0.HostBinding, args: ['style.width',] }, { type: i0.Input }],
|
|
40911
|
-
cssClass: [{ type: i0.HostBinding, args: ['class.igx-combo',] }],
|
|
40912
|
-
role: [{ type: i0.HostBinding, args: ["attr.role",] }],
|
|
40913
|
-
ariaExpanded: [{ type: i0.HostBinding, args: ['attr.aria-expanded',] }],
|
|
40914
|
-
hasPopUp: [{ type: i0.HostBinding, args: ['attr.aria-haspopup',] }],
|
|
40915
|
-
ariaOwns: [{ type: i0.HostBinding, args: ['attr.aria-owns',] }],
|
|
40916
|
-
allowCustomValues: [{ type: i0.Input }],
|
|
40917
|
-
itemsMaxHeight: [{ type: i0.Input }],
|
|
40918
|
-
itemsWidth: [{ type: i0.Input }],
|
|
40919
|
-
itemHeight: [{ type: i0.Input }],
|
|
40920
|
-
placeholder: [{ type: i0.Input }],
|
|
40921
|
-
searchPlaceholder: [{ type: i0.Input }],
|
|
40922
40900
|
showSearchCaseIcon: [{ type: i0.Input }],
|
|
40923
|
-
data: [{ type: i0.Input }],
|
|
40924
|
-
valueKey: [{ type: i0.Input }],
|
|
40925
|
-
displayKey: [{ type: i0.Input }],
|
|
40926
|
-
groupKey: [{ type: i0.Input }],
|
|
40927
|
-
filterable: [{ type: i0.Input }],
|
|
40928
|
-
ariaLabelledBy: [{ type: i0.Input }, { type: i0.HostBinding, args: ['attr.aria-labelledby',] }],
|
|
40929
|
-
disabled: [{ type: i0.Input }],
|
|
40930
|
-
type: [{ type: i0.Input }],
|
|
40931
40901
|
autoFocusSearch: [{ type: i0.Input }],
|
|
40932
|
-
|
|
40933
|
-
|
|
40934
|
-
|
|
40935
|
-
virtDir: [{ type: i0.ViewChild, args: [IgxForOfDirective, { read: IgxForOfDirective, static: true },] }],
|
|
40936
|
-
onArrowDown: [{ type: i0.HostListener, args: ['keydown.ArrowDown', ['$event'],] }, { type: i0.HostListener, args: ['keydown.Alt.ArrowDown', ['$event'],] }]
|
|
40902
|
+
filterable: [{ type: i0.Input }],
|
|
40903
|
+
searchPlaceholder: [{ type: i0.Input }],
|
|
40904
|
+
dropdown: [{ type: i0.ViewChild, args: [IgxComboDropDownComponent, { static: true },] }]
|
|
40937
40905
|
};
|
|
40938
40906
|
/**
|
|
40939
40907
|
* @hidden
|
|
@@ -40956,6 +40924,8 @@
|
|
|
40956
40924
|
IgxComboToggleIconDirective,
|
|
40957
40925
|
IgxComboClearIconDirective],
|
|
40958
40926
|
exports: [IgxComboComponent, IgxComboItemComponent, IgxComboDropDownComponent, IgxComboAddItemComponent,
|
|
40927
|
+
IgxComboGroupingPipe,
|
|
40928
|
+
IgxComboFilteringPipe,
|
|
40959
40929
|
IgxComboItemDirective,
|
|
40960
40930
|
IgxComboEmptyDirective,
|
|
40961
40931
|
IgxComboHeaderItemDirective,
|
|
@@ -40970,6 +40940,296 @@
|
|
|
40970
40940
|
},] }
|
|
40971
40941
|
];
|
|
40972
40942
|
|
|
40943
|
+
/**
|
|
40944
|
+
* Represents a drop-down list that provides filtering functionality, allowing users to choose a single option from a predefined list.
|
|
40945
|
+
*
|
|
40946
|
+
* @igxModule IgxSimpleComboModule
|
|
40947
|
+
* @igxTheme igx-combo-theme
|
|
40948
|
+
* @igxKeywords combobox, single combo selection
|
|
40949
|
+
* @igxGroup Grids & Lists
|
|
40950
|
+
*
|
|
40951
|
+
* @remarks
|
|
40952
|
+
* It provides the ability to filter items as well as perform single selection on the provided data.
|
|
40953
|
+
* Additionally, it exposes keyboard navigation and custom styling capabilities.
|
|
40954
|
+
* @example
|
|
40955
|
+
* ```html
|
|
40956
|
+
* <igx-simple-combo [itemsMaxHeight]="250" [data]="locationData"
|
|
40957
|
+
* [displayKey]="'field'" [valueKey]="'field'"
|
|
40958
|
+
* placeholder="Location" searchPlaceholder="Search...">
|
|
40959
|
+
* </igx-simple-combo>
|
|
40960
|
+
* ```
|
|
40961
|
+
*/
|
|
40962
|
+
var IgxSimpleComboComponent = /** @class */ (function (_super) {
|
|
40963
|
+
__extends(IgxSimpleComboComponent, _super);
|
|
40964
|
+
function IgxSimpleComboComponent(elementRef, cdr, selectionService, comboAPI, _iconService, platformUtil, _displayDensityOptions, _inputGroupType, _injector) {
|
|
40965
|
+
var _this = _super.call(this, elementRef, cdr, selectionService, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector) || this;
|
|
40966
|
+
_this.elementRef = elementRef;
|
|
40967
|
+
_this.cdr = cdr;
|
|
40968
|
+
_this.selectionService = selectionService;
|
|
40969
|
+
_this.comboAPI = comboAPI;
|
|
40970
|
+
_this._iconService = _iconService;
|
|
40971
|
+
_this.platformUtil = platformUtil;
|
|
40972
|
+
_this._displayDensityOptions = _displayDensityOptions;
|
|
40973
|
+
_this._inputGroupType = _inputGroupType;
|
|
40974
|
+
_this._injector = _injector;
|
|
40975
|
+
/**
|
|
40976
|
+
* Emitted when item selection is changing, before the selection completes
|
|
40977
|
+
*
|
|
40978
|
+
* ```html
|
|
40979
|
+
* <igx-simple-combo (selectionChanging)='handleSelection()'></igx-simple-combo>
|
|
40980
|
+
* ```
|
|
40981
|
+
*/
|
|
40982
|
+
_this.selectionChanging = new i0.EventEmitter();
|
|
40983
|
+
/** @hidden @internal */
|
|
40984
|
+
_this.composing = false;
|
|
40985
|
+
_this._updateInput = false;
|
|
40986
|
+
_this.findMatch = function (element) {
|
|
40987
|
+
var value = _this.displayKey ? element[_this.displayKey] : element;
|
|
40988
|
+
return value.toString().toLowerCase().includes(_this.searchValue.trim().toLowerCase());
|
|
40989
|
+
};
|
|
40990
|
+
_this.comboAPI.register(_this);
|
|
40991
|
+
return _this;
|
|
40992
|
+
}
|
|
40993
|
+
Object.defineProperty(IgxSimpleComboComponent.prototype, "filteredData", {
|
|
40994
|
+
/** @hidden @internal */
|
|
40995
|
+
get: function () {
|
|
40996
|
+
return this._filteredData;
|
|
40997
|
+
},
|
|
40998
|
+
/** @hidden @internal */
|
|
40999
|
+
set: function (val) {
|
|
41000
|
+
this._filteredData = this.groupKey ? (val || []).filter(function (e) { return e.isHeader !== true; }) : val;
|
|
41001
|
+
this.checkMatch();
|
|
41002
|
+
},
|
|
41003
|
+
enumerable: false,
|
|
41004
|
+
configurable: true
|
|
41005
|
+
});
|
|
41006
|
+
/**
|
|
41007
|
+
* Select a defined item
|
|
41008
|
+
*
|
|
41009
|
+
* @param item the item to be selected
|
|
41010
|
+
* ```typescript
|
|
41011
|
+
* this.combo.select("New York");
|
|
41012
|
+
* ```
|
|
41013
|
+
*/
|
|
41014
|
+
IgxSimpleComboComponent.prototype.select = function (item) {
|
|
41015
|
+
if (item !== null && item !== undefined) {
|
|
41016
|
+
var newSelection = this.selectionService.add_items(this.id, item instanceof Array ? item : [item], true);
|
|
41017
|
+
this.setSelection(newSelection);
|
|
41018
|
+
}
|
|
41019
|
+
};
|
|
41020
|
+
/**
|
|
41021
|
+
* Deselect a defined item
|
|
41022
|
+
*
|
|
41023
|
+
* @param item the items to be deselected
|
|
41024
|
+
* ```typescript
|
|
41025
|
+
* this.combo.deselect("New York");
|
|
41026
|
+
* ```
|
|
41027
|
+
*/
|
|
41028
|
+
IgxSimpleComboComponent.prototype.deselect = function (item) {
|
|
41029
|
+
if (item !== null && item !== undefined) {
|
|
41030
|
+
var newSelection = this.selectionService.delete_items(this.id, item instanceof Array ? item : [item]);
|
|
41031
|
+
this.setSelection(newSelection);
|
|
41032
|
+
}
|
|
41033
|
+
};
|
|
41034
|
+
/** @hidden @internal */
|
|
41035
|
+
IgxSimpleComboComponent.prototype.writeValue = function (value) {
|
|
41036
|
+
var oldSelection = this.selection;
|
|
41037
|
+
this.selectionService.select_items(this.id, value ? [value] : [], true);
|
|
41038
|
+
this.cdr.markForCheck();
|
|
41039
|
+
this._value = this.createDisplayText(this.selection, oldSelection);
|
|
41040
|
+
};
|
|
41041
|
+
/** @hidden @internal */
|
|
41042
|
+
IgxSimpleComboComponent.prototype.ngAfterViewInit = function () {
|
|
41043
|
+
var _this = this;
|
|
41044
|
+
this.dropdown.opened.pipe(operators.takeUntil(this.destroy$)).subscribe(function () {
|
|
41045
|
+
if (_this.composing) {
|
|
41046
|
+
_this.comboInput.focus();
|
|
41047
|
+
}
|
|
41048
|
+
});
|
|
41049
|
+
this.dropdown.closed.pipe(operators.takeUntil(this.destroy$)).subscribe(function () {
|
|
41050
|
+
_this.composing = false;
|
|
41051
|
+
});
|
|
41052
|
+
this.dropdown.closing.pipe(operators.takeUntil(this.destroy$)).subscribe(function () {
|
|
41053
|
+
var selection = _this.selectionService.first_item(_this.id);
|
|
41054
|
+
_this.comboInput.value = selection !== undefined && selection !== null ? selection : '';
|
|
41055
|
+
});
|
|
41056
|
+
this.dropdown.opening.pipe(operators.takeUntil(this.destroy$)).subscribe(function () {
|
|
41057
|
+
if (!_this.comboInput.value.length) {
|
|
41058
|
+
_this.clearSelection();
|
|
41059
|
+
}
|
|
41060
|
+
});
|
|
41061
|
+
_super.prototype.ngAfterViewInit.call(this);
|
|
41062
|
+
};
|
|
41063
|
+
/** @hidden @internal */
|
|
41064
|
+
IgxSimpleComboComponent.prototype.handleInputChange = function (event) {
|
|
41065
|
+
this.searchValue = event.target.value;
|
|
41066
|
+
this._onChangeCallback(this.searchValue);
|
|
41067
|
+
if (this.collapsed) {
|
|
41068
|
+
this.open();
|
|
41069
|
+
}
|
|
41070
|
+
_super.prototype.handleInputChange.call(this, event);
|
|
41071
|
+
};
|
|
41072
|
+
/** @hidden @internal */
|
|
41073
|
+
IgxSimpleComboComponent.prototype.handleKeyDown = function (event) {
|
|
41074
|
+
if (event.key === this.platformUtil.KEYMAP.ENTER) {
|
|
41075
|
+
var filtered = this.filteredData.find(this.findMatch);
|
|
41076
|
+
if (filtered === null || filtered === undefined) {
|
|
41077
|
+
return;
|
|
41078
|
+
}
|
|
41079
|
+
this.select(this.dropdown.items[0].itemID);
|
|
41080
|
+
event.preventDefault();
|
|
41081
|
+
event.stopPropagation();
|
|
41082
|
+
this.close();
|
|
41083
|
+
return;
|
|
41084
|
+
}
|
|
41085
|
+
if (event.key === this.platformUtil.KEYMAP.BACKSPACE
|
|
41086
|
+
|| event.key === this.platformUtil.KEYMAP.DELETE) {
|
|
41087
|
+
this._updateInput = false;
|
|
41088
|
+
this.clearSelection();
|
|
41089
|
+
}
|
|
41090
|
+
_super.prototype.handleKeyDown.call(this, event);
|
|
41091
|
+
this.composing = event.key !== this.platformUtil.KEYMAP.ARROW_DOWN
|
|
41092
|
+
&& event.key !== this.platformUtil.KEYMAP.ARROW_LEFT
|
|
41093
|
+
&& event.key !== this.platformUtil.KEYMAP.ARROW_RIGHT
|
|
41094
|
+
&& event.key !== this.platformUtil.KEYMAP.TAB;
|
|
41095
|
+
};
|
|
41096
|
+
/** @hidden @internal */
|
|
41097
|
+
IgxSimpleComboComponent.prototype.handleKeyUp = function (event) {
|
|
41098
|
+
if (event.key === this.platformUtil.KEYMAP.ARROW_DOWN) {
|
|
41099
|
+
var firstItem_1 = this.selectionService.first_item(this.id);
|
|
41100
|
+
this.dropdown.focusedItem = firstItem_1 && this.filteredData.length > 0
|
|
41101
|
+
? this.dropdown.items.find(function (i) { return i.itemID === firstItem_1; })
|
|
41102
|
+
: this.dropdown.items[0];
|
|
41103
|
+
this.dropdownContainer.nativeElement.focus();
|
|
41104
|
+
}
|
|
41105
|
+
};
|
|
41106
|
+
/** @hidden @internal */
|
|
41107
|
+
IgxSimpleComboComponent.prototype.getEditElement = function () {
|
|
41108
|
+
return this.comboInput.nativeElement;
|
|
41109
|
+
};
|
|
41110
|
+
/** @hidden @internal */
|
|
41111
|
+
IgxSimpleComboComponent.prototype.handleClear = function (event) {
|
|
41112
|
+
if (this.disabled) {
|
|
41113
|
+
return;
|
|
41114
|
+
}
|
|
41115
|
+
this.clearSelection(true);
|
|
41116
|
+
if (this.collapsed) {
|
|
41117
|
+
this.getEditElement().focus();
|
|
41118
|
+
}
|
|
41119
|
+
else {
|
|
41120
|
+
this.focusSearchInput(true);
|
|
41121
|
+
}
|
|
41122
|
+
event.stopPropagation();
|
|
41123
|
+
this.comboInput.value = this.filterValue = this.searchValue = '';
|
|
41124
|
+
this.dropdown.focusedItem = null;
|
|
41125
|
+
this.comboInput.focus();
|
|
41126
|
+
};
|
|
41127
|
+
/** @hidden @internal */
|
|
41128
|
+
IgxSimpleComboComponent.prototype.handleOpened = function () {
|
|
41129
|
+
this.triggerCheck();
|
|
41130
|
+
this.dropdownContainer.nativeElement.focus();
|
|
41131
|
+
this.opened.emit({ owner: this });
|
|
41132
|
+
};
|
|
41133
|
+
/** @hidden @internal */
|
|
41134
|
+
IgxSimpleComboComponent.prototype.focusSearchInput = function (opening) {
|
|
41135
|
+
if (opening) {
|
|
41136
|
+
this.dropdownContainer.nativeElement.focus();
|
|
41137
|
+
}
|
|
41138
|
+
else {
|
|
41139
|
+
this.comboInput.nativeElement.focus();
|
|
41140
|
+
this.toggle();
|
|
41141
|
+
}
|
|
41142
|
+
};
|
|
41143
|
+
IgxSimpleComboComponent.prototype.setSelection = function (newSelection) {
|
|
41144
|
+
var newSelectionAsArray = newSelection ? Array.from(newSelection) : [];
|
|
41145
|
+
var oldSelectionAsArray = Array.from(this.selectionService.get(this.id) || []);
|
|
41146
|
+
var displayText = this.createDisplayText(newSelectionAsArray, oldSelectionAsArray);
|
|
41147
|
+
var args = {
|
|
41148
|
+
newSelection: newSelectionAsArray[0],
|
|
41149
|
+
oldSelection: oldSelectionAsArray[0],
|
|
41150
|
+
displayText: displayText,
|
|
41151
|
+
owner: this,
|
|
41152
|
+
cancel: false
|
|
41153
|
+
};
|
|
41154
|
+
this.selectionChanging.emit(args);
|
|
41155
|
+
if (!args.cancel) {
|
|
41156
|
+
var argsSelection = args.newSelection !== undefined
|
|
41157
|
+
&& args.newSelection !== null
|
|
41158
|
+
? [args.newSelection]
|
|
41159
|
+
: [];
|
|
41160
|
+
this.selectionService.select_items(this.id, argsSelection, true);
|
|
41161
|
+
if (this._updateInput) {
|
|
41162
|
+
this._value = displayText !== args.displayText
|
|
41163
|
+
? args.displayText
|
|
41164
|
+
: this.createDisplayText([args.newSelection], [args.oldSelection]);
|
|
41165
|
+
}
|
|
41166
|
+
this._onChangeCallback(args.newSelection);
|
|
41167
|
+
this._updateInput = true;
|
|
41168
|
+
}
|
|
41169
|
+
};
|
|
41170
|
+
IgxSimpleComboComponent.prototype.createDisplayText = function (newSelection, oldSelection) {
|
|
41171
|
+
var _this = this;
|
|
41172
|
+
if (this.isRemote) {
|
|
41173
|
+
return this.getRemoteSelection(newSelection, oldSelection);
|
|
41174
|
+
}
|
|
41175
|
+
return this.displayKey !== null && this.displayKey !== undefined
|
|
41176
|
+
? this.convertKeysToItems(newSelection).map(function (e) { return e[_this.displayKey]; })[0]
|
|
41177
|
+
: newSelection[0];
|
|
41178
|
+
};
|
|
41179
|
+
IgxSimpleComboComponent.prototype.clearSelection = function (ignoreFilter) {
|
|
41180
|
+
var newSelection = this.selectionService.get_empty();
|
|
41181
|
+
if (this.filteredData.length !== this.data.length && !ignoreFilter) {
|
|
41182
|
+
newSelection = this.selectionService.delete_items(this.id, this.selectionService.get_all_ids(this.filteredData, this.valueKey));
|
|
41183
|
+
}
|
|
41184
|
+
this.setSelection(newSelection);
|
|
41185
|
+
};
|
|
41186
|
+
return IgxSimpleComboComponent;
|
|
41187
|
+
}(IgxComboBaseDirective));
|
|
41188
|
+
IgxSimpleComboComponent.decorators = [
|
|
41189
|
+
{ type: i0.Component, args: [{
|
|
41190
|
+
selector: 'igx-simple-combo',
|
|
41191
|
+
template: "<igx-input-group #inputGroup [displayDensity]=\"displayDensity\" [type]=\"type\">\n <ng-container ngProjectAs=\"[igxLabel]\">\n <ng-content select=\"[igxLabel]\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"igx-prefix\">\n <ng-content select=\"igx-prefix\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"igx-hint, [igxHint]\">\n <ng-content select=\"igx-hint, [igxHint]\"></ng-content>\n </ng-container>\n\n <input #comboInput igxInput [value]=\"value\" (input)=\"handleInputChange($event)\" (keyup)=\"handleKeyUp($event)\"\n (keydown)=\"handleKeyDown($event)\" (blur)=\"onBlur()\" [attr.placeholder]=\"placeholder\"\n aria-autocomplete=\"both\" [attr.aria-owns]=\"dropdown.id\" [attr.aria-labelledby]=\"ariaLabelledBy\"\n [disabled]=\"disabled\" [igxTextSelection]=\"!composing\" />\n\n <ng-container ngProjectAs=\"igx-suffix\">\n <ng-content select=\"igx-suffix\"></ng-content>\n </ng-container>\n <igx-suffix *ngIf=\"comboInput.value.length\" aria-label=\"Clear Selection\" class=\"igx-combo__clear-button\"\n (click)=\"handleClear($event)\">\n <ng-container *ngIf=\"clearIconTemplate\">\n <ng-container *ngTemplateOutlet=\"clearIconTemplate\"></ng-container>\n </ng-container>\n <igx-icon *ngIf=\"!clearIconTemplate\">\n clear\n </igx-icon>\n </igx-suffix>\n <igx-suffix class=\"igx-combo__toggle-button\">\n <ng-container *ngIf=\"toggleIconTemplate\">\n <ng-container *ngTemplateOutlet=\"toggleIconTemplate; context: {$implicit: collapsed}\"></ng-container>\n </ng-container>\n <igx-icon (click)=\"onClick($event)\" *ngIf=\"!toggleIconTemplate\">\n {{ dropdown.collapsed ? 'arrow_drop_down' : 'arrow_drop_up'}}\n </igx-icon>\n </igx-suffix>\n</igx-input-group>\n\n<igx-combo-drop-down #igxComboDropDown class=\"igx-combo__drop-down\" [displayDensity]=\"displayDensity\"\n [width]=\"itemsWidth || '100%'\" (opening)=\"handleOpening($event)\" (closing)=\"handleClosing($event)\"\n (opened)=\"handleOpened()\" (closed)=\"handleClosed()\" [singleMode]=\"true\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\">\n </ng-container>\n <div #dropdownItemContainer class=\"igx-combo__content\" [style.overflow]=\"'hidden'\"\n [style.maxHeight.px]=\"itemsMaxHeight\" [igxDropDownItemNavigation]=\"dropdown\" (focus)=\"dropdown.onFocus()\"\n [tabindex]=\"dropdown.collapsed ? -1 : 0\" role=\"listbox\" [attr.id]=\"dropdown.id\">\n <igx-combo-item role=\"option\" [singleMode]=\"true\" [itemHeight]='itemHeight' (click)=\"close()\" *igxFor=\"let item of data\n | comboFiltering:filterValue:displayKey:filteringOptions:true\n | comboGrouping:groupKey:valueKey\n index as rowIndex; containerSize: itemsMaxHeight; scrollOrientation: 'vertical'; itemSize: itemHeight\"\n [value]=\"item\" [isHeader]=\"item.isHeader\" [index]=\"rowIndex\">\n <ng-container *ngIf=\"item.isHeader\">\n <ng-container\n *ngTemplateOutlet=\"headerItemTemplate ? headerItemTemplate : headerItemBase;\n context: {$implicit: item, data: data, valueKey: valueKey, groupKey: groupKey, displayKey: displayKey}\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!item.isHeader\">\n <ng-container #listItem\n *ngTemplateOutlet=\"template; context: {$implicit: item, data: data, valueKey: valueKey, displayKey: displayKey};\">\n </ng-container>\n </ng-container>\n </igx-combo-item>\n </div>\n\n <div class=\"igx-combo__add\" *ngIf=\"filteredData.length === 0 || isAddButtonVisible()\">\n <div class=\"igx-combo__empty\" *ngIf=\"filteredData.length === 0\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate ? emptyTemplate : empty\">\n </ng-container>\n </div>\n <igx-combo-add-item [itemHeight]=\"itemHeight\" *ngIf=\"isAddButtonVisible()\"\n [tabindex]=\"dropdown.collapsed ? -1 : customValueFlag ? 1 : -1\" class=\"igx-combo__add-item\" role=\"button\"\n aria-label=\"Add Item\" [index]=\"virtualScrollContainer.igxForOf.length\">\n <ng-container *ngTemplateOutlet=\"addItemTemplate ? addItemTemplate : addItemDefault\">\n </ng-container>\n </igx-combo-add-item>\n </div>\n <ng-container *ngTemplateOutlet=\"footerTemplate\">\n </ng-container>\n</igx-combo-drop-down>\n\n<ng-template #complex let-display let-data=\"data\" let-key=\"displayKey\">\n {{display[key]}}\n</ng-template>\n<ng-template #primitive let-display>\n {{display}}\n</ng-template>\n<ng-template #empty>\n <span>The list is empty</span>\n</ng-template>\n<ng-template #addItemDefault let-control>\n <button igxButton=\"flat\" igxRipple>Add item</button>\n</ng-template>\n<ng-template #headerItemBase let-item let-key=\"valueKey\" let-groupKey=\"groupKey\">\n {{ item[key] }}\n</ng-template>\n",
|
|
41192
|
+
providers: [
|
|
41193
|
+
IgxComboAPIService,
|
|
41194
|
+
{ provide: IGX_COMBO_COMPONENT, useExisting: IgxSimpleComboComponent },
|
|
41195
|
+
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: IgxSimpleComboComponent, multi: true }
|
|
41196
|
+
]
|
|
41197
|
+
},] }
|
|
41198
|
+
];
|
|
41199
|
+
IgxSimpleComboComponent.ctorParameters = function () { return [
|
|
41200
|
+
{ type: i0.ElementRef },
|
|
41201
|
+
{ type: i0.ChangeDetectorRef },
|
|
41202
|
+
{ type: IgxSelectionAPIService },
|
|
41203
|
+
{ type: IgxComboAPIService },
|
|
41204
|
+
{ type: IgxIconService },
|
|
41205
|
+
{ type: PlatformUtil },
|
|
41206
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [DisplayDensityToken,] }] },
|
|
41207
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [IGX_INPUT_GROUP_TYPE,] }] },
|
|
41208
|
+
{ type: i0.Injector, decorators: [{ type: i0.Optional }] }
|
|
41209
|
+
]; };
|
|
41210
|
+
IgxSimpleComboComponent.propDecorators = {
|
|
41211
|
+
dropdown: [{ type: i0.ViewChild, args: [IgxComboDropDownComponent, { static: true },] }],
|
|
41212
|
+
selectionChanging: [{ type: i0.Output }]
|
|
41213
|
+
};
|
|
41214
|
+
var IgxSimpleComboModule = /** @class */ (function () {
|
|
41215
|
+
function IgxSimpleComboModule() {
|
|
41216
|
+
}
|
|
41217
|
+
return IgxSimpleComboModule;
|
|
41218
|
+
}());
|
|
41219
|
+
IgxSimpleComboModule.decorators = [
|
|
41220
|
+
{ type: i0.NgModule, args: [{
|
|
41221
|
+
declarations: [IgxSimpleComboComponent],
|
|
41222
|
+
imports: [
|
|
41223
|
+
IgxComboModule, IgxRippleModule, i2.CommonModule,
|
|
41224
|
+
IgxInputGroupModule, forms.FormsModule, forms.ReactiveFormsModule,
|
|
41225
|
+
IgxForOfModule, IgxToggleModule, IgxCheckboxModule,
|
|
41226
|
+
IgxDropDownModule, IgxButtonModule, IgxIconModule,
|
|
41227
|
+
IgxTextSelectionModule
|
|
41228
|
+
],
|
|
41229
|
+
exports: [IgxSimpleComboComponent, IgxComboModule]
|
|
41230
|
+
},] }
|
|
41231
|
+
];
|
|
41232
|
+
|
|
40973
41233
|
/** Header orientation in `dialog` mode. */
|
|
40974
41234
|
var PickerHeaderOrientation = mkenum({
|
|
40975
41235
|
Horizontal: 'horizontal',
|
|
@@ -68874,6 +69134,26 @@
|
|
|
68874
69134
|
enumerable: false,
|
|
68875
69135
|
configurable: true
|
|
68876
69136
|
});
|
|
69137
|
+
Object.defineProperty(IgxGridComponent.prototype, "groupStrategy", {
|
|
69138
|
+
/**
|
|
69139
|
+
* Gets/Sets the grouping strategy of the grid.
|
|
69140
|
+
*
|
|
69141
|
+
* @remarks The default IgxGrouping extends from IgxSorting and a custom one can be used as a `sortStrategy` as well.
|
|
69142
|
+
*
|
|
69143
|
+
* @example
|
|
69144
|
+
* ```html
|
|
69145
|
+
* <igx-grid #grid [data]="localData" [groupStrategy]="groupStrategy"></igx-grid>
|
|
69146
|
+
* ```
|
|
69147
|
+
*/
|
|
69148
|
+
get: function () {
|
|
69149
|
+
return this._groupStrategy;
|
|
69150
|
+
},
|
|
69151
|
+
set: function (value) {
|
|
69152
|
+
this._groupStrategy = value;
|
|
69153
|
+
},
|
|
69154
|
+
enumerable: false,
|
|
69155
|
+
configurable: true
|
|
69156
|
+
});
|
|
68877
69157
|
Object.defineProperty(IgxGridComponent.prototype, "dropAreaMessage", {
|
|
68878
69158
|
get: function () {
|
|
68879
69159
|
return this._dropAreaMessage || this.resourceStrings.igx_grid_groupByArea_message;
|
|
@@ -69695,7 +69975,7 @@
|
|
|
69695
69975
|
IgxForOfScrollSyncService
|
|
69696
69976
|
],
|
|
69697
69977
|
selector: 'igx-grid',
|
|
69698
|
-
template: "<!-- Toolbar area -->\n<ng-content select=\"igx-grid-toolbar\"></ng-content>\n\n<!-- Group-by area -->\n<ng-container *ngIf=\"showGroupArea && (groupingExpressions.length > 0 || hasGroupableColumns)\">\n <igx-grid-group-by-area #groupArea [style.flex-basis.px]='outerWidth'\n [grid]=\"this\"\n [expressions]=\"groupingExpressions\"\n [sortingExpressions]=\"sortingExpressions\"\n [density]=\"displayDensity\"\n [dropAreaTemplate]=\"dropAreaTemplate\"\n [dropAreaMessage]=\"dropAreaMessage\"\n >\n </igx-grid-group-by-area>\n</ng-container>\n\n<!-- Grid table head row area -->\n<igx-grid-header-row class=\"igx-grid-thead\" tabindex=\"0\"\n [grid]=\"this\"\n [hasMRL]=\"hasColumnLayouts\"\n [density]=\"displayDensity\"\n [activeDescendant]=\"activeDescendant\"\n [width]=\"calcWidth\"\n [pinnedColumnCollection]=\"pinnedColumns\"\n [unpinnedColumnCollection]=\"unpinnedColumns\"\n (keydown.meta.c)=\"copyHandler($event)\"\n (keydown.control.c)=\"copyHandler($event)\"\n (copy)=\"copyHandler($event)\"\n (keydown)=\"navigation.headerNavigation($event)\"\n (scroll)=\"preventHeaderScroll($event)\"\n (focus)=\"navigation.focusFirstCell()\"\n>\n</igx-grid-header-row>\n\n<div igxGridBody (keydown.control.c)=\"copyHandler($event)\" (copy)=\"copyHandler($event)\" class=\"igx-grid__tbody\" role=\"rowgroup\">\n <div class=\"igx-grid__tbody-content\" tabindex=\"0\" [attr.role]=\"dataView.length ? null : 'row'\" (keydown)=\"navigation.handleNavigation($event)\" (focus)=\"navigation.focusTbody($event)\"\n (dragStop)=\"selectionService.dragMode = $event\" (scroll)='preventContainerScroll($event)'\n (dragScroll)=\"dragScroll($event)\" [igxGridDragSelect]=\"selectionService.dragMode\"\n [style.height.px]='totalHeight' [style.width.px]='calcWidth || null' #tbody [attr.aria-activedescendant]=\"activeDescendant\">\n <span *ngIf=\"hasMovableColumns && columnInDrag && pinnedColumns.length <= 0\"\n [igxColumnMovingDrop]=\"headerContainer\" [attr.droppable]=\"true\" id=\"left\"\n class=\"igx-grid__scroll-on-drag-left\"></span>\n <span *ngIf=\"hasMovableColumns && columnInDrag && pinnedColumns.length > 0\"\n [igxColumnMovingDrop]=\"headerContainer\" [attr.droppable]=\"true\" id=\"left\"\n class=\"igx-grid__scroll-on-drag-pinned\" [style.left.px]=\"pinnedWidth\"></span>\n <ng-container *ngTemplateOutlet=\"hasPinnedRecords && isRowPinningToTop ? pinnedRecordsTemplate : null\">\n </ng-container>\n <ng-template #pinnedRecordsTemplate>\n <ng-container *ngIf='data\n | gridTransaction:id:pipeTrigger\n | visibleColumns:hasVisibleColumns\n | gridAddRow:true:pipeTrigger\n | gridRowPinning:id:true:pipeTrigger\n | gridFiltering:filteringExpressionsTree:filterStrategy:advancedFilteringExpressionsTree:id:pipeTrigger:filteringPipeTrigger:true\n | gridSort:sortingExpressions:sortStrategy:id:pipeTrigger:true as pinnedData'>\n <div #pinContainer *ngIf='pinnedData.length > 0'\n [ngClass]=\"{\n 'igx-grid__tr--pinned-bottom': !isRowPinningToTop,\n 'igx-grid__tr--pinned-top': isRowPinningToTop\n }\"\n class='igx-grid__tr--pinned' [style.width.px]='calcWidth'>\n <ng-container *ngFor=\"let rowData of pinnedData; let rowIndex = index\">\n <ng-container *ngTemplateOutlet=\"pinned_record_template; context: getContext(rowData, rowIndex, true)\">\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </ng-template>\n <ng-template igxGridFor let-rowData [igxGridForOf]=\"data\n | gridTransaction:id:pipeTrigger\n | visibleColumns:hasVisibleColumns\n | gridFiltering:filteringExpressionsTree:filterStrategy:advancedFilteringExpressionsTree:id:pipeTrigger:filteringPipeTrigger\n | gridSort:sortingExpressions:sortStrategy:id:pipeTrigger\n | gridGroupBy:groupingExpressions:groupingExpansionState:groupsExpanded:id:groupsRecords:pipeTrigger\n | gridPaging:paginator?.page:paginator?.perPage:id:pipeTrigger\n | gridSummary:hasSummarizedColumns:summaryCalculationMode:summaryPosition:id:showSummaryOnCollapse:pipeTrigger:summaryPipeTrigger\n | gridDetails:hasDetails:expansionStates:pipeTrigger\n | gridAddRow:false:pipeTrigger\n | gridRowPinning:id:false:pipeTrigger\"\n let-rowIndex=\"index\" [igxForScrollOrientation]=\"'vertical'\" [igxForScrollContainer]='verticalScroll'\n [igxForContainerSize]='calcHeight'\n [igxForItemSize]=\"hasColumnLayouts ? rowHeight * multiRowLayoutRowSize + 1 : renderedRowHeight\"\n [igxForTrackBy]='trackChanges'\n #verticalScrollContainer (chunkPreload)=\"dataLoading($event)\">\n <ng-template\n [igxTemplateOutlet]='getRowTemplate(rowData)'\n [igxTemplateOutletContext]='getContext(rowData, rowIndex)'\n (cachedViewLoaded)='cachedViewLoaded($event)'\n (viewCreated)='viewCreatedHandler($event)'\n (viewMoved)='viewMovedHandler($event)'>\n </ng-template>\n </ng-template>\n <ng-container *ngTemplateOutlet=\"hasPinnedRecords && !isRowPinningToTop ? pinnedRecordsTemplate : null\">\n </ng-container>\n <ng-template #record_template let-rowIndex=\"index\" let-rowData let-disabledRow=\"disabled\">\n <igx-grid-row [gridID]=\"id\" [index]=\"rowIndex\" [rowData]=\"rowData\" [disabled]=\"disabledRow\"\n [ngClass]=\"rowClasses | igxGridRowClasses:row:row.inEditMode:row.selected:row.dirty:row.deleted:row.dragging:rowIndex:hasColumnLayouts:false:pipeTrigger\"\n [ngStyle]=\"rowStyles | igxGridRowStyles:rowData:rowIndex:pipeTrigger\" #row>\n </igx-grid-row>\n </ng-template>\n <ng-template #pinned_record_template let-rowIndex=\"index\" let-rowData>\n <igx-grid-row [gridID]=\"id\" [index]=\"rowIndex\" [rowData]=\"rowData\"\n [ngClass]=\"rowClasses | igxGridRowClasses:row:row.inEditMode:row.selected:row.dirty:row.deleted:row.dragging:rowIndex:hasColumnLayouts:false:pipeTrigger\"\n [ngStyle]=\"rowStyles | igxGridRowStyles:rowData:rowIndex:pipeTrigger\"#row #pinnedRow>\n </igx-grid-row>\n </ng-template>\n <ng-template #group_template let-rowIndex=\"index\" let-rowData>\n <igx-grid-groupby-row [gridID]=\"id\" [index]=\"rowIndex\" [groupRow]=\"rowData\" [hideGroupRowSelectors]=\"hideRowSelectors\" [rowDraggable]=\"rowDraggable\" #row>\n </igx-grid-groupby-row>\n </ng-template>\n <ng-template #summary_template let-rowIndex=\"index\" let-rowData>\n <igx-grid-summary-row role=\"row\" [gridID]=\"id\" [summaries]=\"rowData.summaries\" [index]=\"rowIndex\"\n class=\"igx-grid__summaries--body\" #summaryRow>\n </igx-grid-summary-row>\n </ng-template>\n <ng-template #detail_template_container let-rowIndex=\"index\" let-rowData>\n <div detail='true' style=\"overflow: auto; width: 100%;\" id=\"{{id}}_{{rowIndex}}\" (pointerdown)='detailsViewFocused(detailsContainer, rowIndex)' #detailsContainer [attr.data-rowindex]='rowIndex'\n [ngClass]=\"{\n 'igx-grid__tr-container': true,\n 'igx-grid__tr-container--active': isDetailActive(rowIndex)\n }\">\n <div class=\"igx-grid__hierarchical-indent\" style='display: flex;'>\n <ng-container *ngIf=\"this.groupingExpressions.length > 0\">\n <div class=\"igx-grid__row-indentation igx-grid__row-indentation--level-{{groupingExpressions.length}}\"></div>\n </ng-container>\n <ng-template\n [ngTemplateOutlet]='detailTemplate'\n [ngTemplateOutletContext]='getDetailsContext(rowData, rowIndex)'>\n </ng-template>\n </div>\n </div>\n </ng-template>\n\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n <div class=\"igx-grid__row-editing-outlet\" igxOverlayOutlet #igxRowEditingOverlayOutlet></div>\n <igc-trial-watermark></igc-trial-watermark>\n </div>\n <div igxToggle #loadingOverlay>\n <igx-circular-bar [indeterminate]=\"true\" *ngIf='shouldOverlayLoading'>\n </igx-circular-bar>\n </div>\n <span *ngIf=\"hasMovableColumns && columnInDrag\" [igxColumnMovingDrop]=\"headerContainer\" [attr.droppable]=\"true\"\n id=\"right\" class=\"igx-grid__scroll-on-drag-right\"></span>\n <div [hidden]='!hasVerticalScroll()' class=\"igx-grid__tbody-scrollbar\" [style.width.px]=\"scrollSize\" (pointerdown)=\"$event.preventDefault()\">\n <div class=\"igx-grid__tbody-scrollbar-start\" [style.height.px]=' isRowPinningToTop ? pinnedRowHeight : 0'></div>\n <div class=\"igx-grid__tbody-scrollbar-main\" [style.height.px]='calcHeight'>\n <ng-template igxGridFor [igxGridForOf]='[]' #verticalScrollHolder></ng-template>\n </div>\n <div class=\"igx-grid__tbody-scrollbar-end\" [style.height.px]='!isRowPinningToTop ? pinnedRowHeight : 0'></div>\n </div>\n\n <div class=\"igx-grid__addrow-snackbar\">\n <igx-snackbar #addRowSnackbar [outlet]=\"igxBodyOverlayOutlet\" [actionText]=\"resourceStrings.igx_grid_snackbar_addrow_actiontext\" [displayTime]='snackbarDisplayTime'>{{resourceStrings.igx_grid_snackbar_addrow_label}}</igx-snackbar>\n </div>\n\n <div #igxBodyOverlayOutlet=\"overlay-outlet\" igxOverlayOutlet></div>\n</div>\n\n\n<div class=\"igx-grid__tfoot\" role=\"rowgroup\" [style.height.px]='summariesHeight' #tfoot>\n <div tabindex=\"0\" (focus)=\"navigation.focusFirstCell(false)\" (keydown)=\"navigation.summaryNav($event)\" [attr.aria-activedescendant]=\"activeDescendant\">\n <igx-grid-summary-row [style.width.px]='calcWidth' [style.height.px]='summariesHeight'\n *ngIf=\"hasSummarizedColumns && rootSummariesEnabled\" [gridID]=\"id\" role=\"row\"\n [summaries]=\"id | igxGridSummaryDataPipe:summaryService.retriggerRootPipe\" [index]=\"dataView.length\"\n class=\"igx-grid__summaries\" #summaryRow>\n </igx-grid-summary-row>\n <div class=\"igx-grid__tfoot-thumb\" [hidden]='!hasVerticalScroll()' [style.height.px]='summariesHeight'\n [style.width.px]=\"scrollSize\"></div>\n </div>\n</div>\n\n<div class=\"igx-grid__scroll\" [style.height.px]=\"scrollSize\" #scr [hidden]=\"isHorizontalScrollHidden\" (pointerdown)=\"$event.preventDefault()\">\n <div class=\"igx-grid__scroll-start\" [style.width.px]='isPinningToStart ? pinnedWidth : headerFeaturesWidth' [style.min-width.px]='isPinningToStart ? pinnedWidth : headerFeaturesWidth'></div>\n <div class=\"igx-grid__scroll-main\" [style.width.px]='unpinnedWidth'>\n <ng-template igxGridFor [igxGridForOf]='EMPTY_DATA' #scrollContainer>\n </ng-template>\n </div>\n <div class=\"igx-grid__scroll-end\" [style.float]='\"right\"' [style.width.px]='pinnedWidth' [style.min-width.px]='pinnedWidth' [hidden]=\"pinnedWidth === 0 || isPinningToStart\"></div>\n</div>\n\n<div class=\"igx-grid__footer\" #footer>\n <ng-content select=\"igx-grid-footer\"></ng-content>\n <ng-container *ngIf=\"totalRecords || pagingMode === 1\">\n <ng-content select=\"igx-paginator\"></ng-content>\n </ng-container>\n</div>\n\n<ng-template #emptyFilteredGrid>\n <span class=\"igx-grid__tbody-message\" role=\"cell\">\n <span>{{emptyFilteredGridMessage}}</span>\n <span *ngIf='showAddButton'>\n <ng-container *ngTemplateOutlet='addRowEmptyTemplate || defaultAddRowEmptyTemplate'></ng-container>\n </span>\n </span>\n</ng-template>\n\n<ng-template #defaultEmptyGrid>\n <span class=\"igx-grid__tbody-message\" role=\"cell\">\n <span>{{emptyGridMessage}}</span>\n <span *ngIf='showAddButton'>\n <ng-container *ngTemplateOutlet='addRowEmptyTemplate || defaultAddRowEmptyTemplate'></ng-container>\n </span>\n </span>\n</ng-template>\n\n<ng-template #defaultAddRowEmptyTemplate>\n <button igxButton=\"raised\" igxRipple (click)=\"this.crudService.enterAddRowMode(null, false, $event)\">\n {{resourceStrings.igx_grid_add_row_label}}\n </button>\n</ng-template>\n\n<ng-template #defaultLoadingGrid>\n <div class=\"igx-grid__loading\">\n <igx-circular-bar [indeterminate]=\"true\">\n </igx-circular-bar>\n </div>\n</ng-template>\n\n<ng-template #defaultExpandedTemplate>\n <igx-icon role=\"button\" class=\"igx-grid__group-expand-btn\"\n [ngClass]=\"{\n 'igx-grid__group-expand-btn--push': filteringService.isFilterRowVisible\n}\">unfold_less</igx-icon>\n</ng-template>\n\n <ng-template #defaultCollapsedTemplate>\n <igx-icon role=\"button\" class=\"igx-grid__group-expand-btn\"\n [ngClass]=\"{\n 'igx-grid__group-expand-btn--push': filteringService.isFilterRowVisible\n}\">unfold_more</igx-icon>\n</ng-template>\n\n<div *ngIf=\"rowEditable\" igxToggle #rowEditingOverlay>\n <div [className]=\"bannerClass\">\n <ng-container\n *ngTemplateOutlet=\"rowEditContainer; context: { rowChangesCount: rowChangesCount, endEdit: this.endEdit.bind(this) }\">\n </ng-container>\n </div>\n</div>\n\n<ng-template #defaultRowEditText>\n You have {{ rowChangesCount }} changes in this row\n</ng-template>\n\n<ng-template #defaultRowEditActions>\n <button igxButton igxRowEditTabStop (click)=\"this.endRowEditTabStop(false, $event)\">{{ this.resourceStrings.igx_grid_row_edit_btn_cancel }}</button>\n <button igxButton igxRowEditTabStop (click)=\"this.endRowEditTabStop(true, $event)\">{{ this.resourceStrings.igx_grid_row_edit_btn_done }}</button>\n</ng-template>\n\n<ng-template #defaultRowEditTemplate>\n <div class=\"igx-banner__message\">\n <span class=\"igx-banner__text\">\n <ng-container\n *ngTemplateOutlet=\"this.crudService.row?.getClassName() === 'IgxAddRow' ? rowAddText : rowEditText ? rowEditText : defaultRowEditText;\n context: { $implicit: this.crudService.row?.getClassName() !== 'IgxAddRow' ? rowChangesCount : null }\">\n </ng-container>\n </span>\n </div>\n <div class=\"igx-banner__actions\">\n <div class=\"igx-banner__row\">\n <ng-container\n *ngTemplateOutlet=\"rowEditActions ? rowEditActions : defaultRowEditActions; context: { $implicit: this.endEdit.bind(this) }\">\n </ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #dragIndicatorIconBase>\n <igx-icon>drag_indicator</igx-icon>\n</ng-template>\n\n<igx-grid-column-resizer *ngIf=\"colResizingService.showResizer\"></igx-grid-column-resizer>\n<div class=\"igx-grid__loading-outlet\" #igxLoadingOverlayOutlet igxOverlayOutlet></div>\n<div class=\"igx-grid__outlet\" #igxFilteringOverlayOutlet igxOverlayOutlet></div>\n"
|
|
69978
|
+
template: "<!-- Toolbar area -->\n<ng-content select=\"igx-grid-toolbar\"></ng-content>\n\n<!-- Group-by area -->\n<ng-container *ngIf=\"showGroupArea && (groupingExpressions.length > 0 || hasGroupableColumns)\">\n <igx-grid-group-by-area #groupArea [style.flex-basis.px]='outerWidth'\n [grid]=\"this\"\n [expressions]=\"groupingExpressions\"\n [sortingExpressions]=\"sortingExpressions\"\n [density]=\"displayDensity\"\n [dropAreaTemplate]=\"dropAreaTemplate\"\n [dropAreaMessage]=\"dropAreaMessage\"\n >\n </igx-grid-group-by-area>\n</ng-container>\n\n<!-- Grid table head row area -->\n<igx-grid-header-row class=\"igx-grid-thead\" tabindex=\"0\"\n [grid]=\"this\"\n [hasMRL]=\"hasColumnLayouts\"\n [density]=\"displayDensity\"\n [activeDescendant]=\"activeDescendant\"\n [width]=\"calcWidth\"\n [pinnedColumnCollection]=\"pinnedColumns\"\n [unpinnedColumnCollection]=\"unpinnedColumns\"\n (keydown.meta.c)=\"copyHandler($event)\"\n (keydown.control.c)=\"copyHandler($event)\"\n (copy)=\"copyHandler($event)\"\n (keydown)=\"navigation.headerNavigation($event)\"\n (scroll)=\"preventHeaderScroll($event)\"\n (focus)=\"navigation.focusFirstCell()\"\n>\n</igx-grid-header-row>\n\n<div igxGridBody (keydown.control.c)=\"copyHandler($event)\" (copy)=\"copyHandler($event)\" class=\"igx-grid__tbody\" role=\"rowgroup\">\n <div class=\"igx-grid__tbody-content\" tabindex=\"0\" [attr.role]=\"dataView.length ? null : 'row'\" (keydown)=\"navigation.handleNavigation($event)\" (focus)=\"navigation.focusTbody($event)\"\n (dragStop)=\"selectionService.dragMode = $event\" (scroll)='preventContainerScroll($event)'\n (dragScroll)=\"dragScroll($event)\" [igxGridDragSelect]=\"selectionService.dragMode\"\n [style.height.px]='totalHeight' [style.width.px]='calcWidth || null' #tbody [attr.aria-activedescendant]=\"activeDescendant\">\n <span *ngIf=\"hasMovableColumns && columnInDrag && pinnedColumns.length <= 0\"\n [igxColumnMovingDrop]=\"headerContainer\" [attr.droppable]=\"true\" id=\"left\"\n class=\"igx-grid__scroll-on-drag-left\"></span>\n <span *ngIf=\"hasMovableColumns && columnInDrag && pinnedColumns.length > 0\"\n [igxColumnMovingDrop]=\"headerContainer\" [attr.droppable]=\"true\" id=\"left\"\n class=\"igx-grid__scroll-on-drag-pinned\" [style.left.px]=\"pinnedWidth\"></span>\n <ng-container *ngTemplateOutlet=\"hasPinnedRecords && isRowPinningToTop ? pinnedRecordsTemplate : null\">\n </ng-container>\n <ng-template #pinnedRecordsTemplate>\n <ng-container *ngIf='data\n | gridTransaction:id:pipeTrigger\n | visibleColumns:hasVisibleColumns\n | gridAddRow:true:pipeTrigger\n | gridRowPinning:id:true:pipeTrigger\n | gridFiltering:filteringExpressionsTree:filterStrategy:advancedFilteringExpressionsTree:id:pipeTrigger:filteringPipeTrigger:true\n | gridSort:sortingExpressions:sortStrategy:id:pipeTrigger:true as pinnedData'>\n <div #pinContainer *ngIf='pinnedData.length > 0'\n [ngClass]=\"{\n 'igx-grid__tr--pinned-bottom': !isRowPinningToTop,\n 'igx-grid__tr--pinned-top': isRowPinningToTop\n }\"\n class='igx-grid__tr--pinned' [style.width.px]='calcWidth'>\n <ng-container *ngFor=\"let rowData of pinnedData; let rowIndex = index\">\n <ng-container *ngTemplateOutlet=\"pinned_record_template; context: getContext(rowData, rowIndex, true)\">\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </ng-template>\n <ng-template igxGridFor let-rowData [igxGridForOf]=\"data\n | gridTransaction:id:pipeTrigger\n | visibleColumns:hasVisibleColumns\n | gridFiltering:filteringExpressionsTree:filterStrategy:advancedFilteringExpressionsTree:id:pipeTrigger:filteringPipeTrigger\n | gridSort:sortingExpressions:sortStrategy:id:pipeTrigger\n | gridGroupBy:groupingExpressions:groupingExpansionState:groupStrategy:groupsExpanded:id:groupsRecords:pipeTrigger\n | gridPaging:paginator?.page:paginator?.perPage:id:pipeTrigger\n | gridSummary:hasSummarizedColumns:summaryCalculationMode:summaryPosition:id:showSummaryOnCollapse:pipeTrigger:summaryPipeTrigger\n | gridDetails:hasDetails:expansionStates:pipeTrigger\n | gridAddRow:false:pipeTrigger\n | gridRowPinning:id:false:pipeTrigger\"\n let-rowIndex=\"index\" [igxForScrollOrientation]=\"'vertical'\" [igxForScrollContainer]='verticalScroll'\n [igxForContainerSize]='calcHeight'\n [igxForItemSize]=\"hasColumnLayouts ? rowHeight * multiRowLayoutRowSize + 1 : renderedRowHeight\"\n [igxForTrackBy]='trackChanges'\n #verticalScrollContainer (chunkPreload)=\"dataLoading($event)\">\n <ng-template\n [igxTemplateOutlet]='getRowTemplate(rowData)'\n [igxTemplateOutletContext]='getContext(rowData, rowIndex)'\n (cachedViewLoaded)='cachedViewLoaded($event)'\n (viewCreated)='viewCreatedHandler($event)'\n (viewMoved)='viewMovedHandler($event)'>\n </ng-template>\n </ng-template>\n <ng-container *ngTemplateOutlet=\"hasPinnedRecords && !isRowPinningToTop ? pinnedRecordsTemplate : null\">\n </ng-container>\n <ng-template #record_template let-rowIndex=\"index\" let-rowData let-disabledRow=\"disabled\">\n <igx-grid-row [gridID]=\"id\" [index]=\"rowIndex\" [rowData]=\"rowData\" [disabled]=\"disabledRow\"\n [ngClass]=\"rowClasses | igxGridRowClasses:row:row.inEditMode:row.selected:row.dirty:row.deleted:row.dragging:rowIndex:hasColumnLayouts:false:pipeTrigger\"\n [ngStyle]=\"rowStyles | igxGridRowStyles:rowData:rowIndex:pipeTrigger\" #row>\n </igx-grid-row>\n </ng-template>\n <ng-template #pinned_record_template let-rowIndex=\"index\" let-rowData>\n <igx-grid-row [gridID]=\"id\" [index]=\"rowIndex\" [rowData]=\"rowData\"\n [ngClass]=\"rowClasses | igxGridRowClasses:row:row.inEditMode:row.selected:row.dirty:row.deleted:row.dragging:rowIndex:hasColumnLayouts:false:pipeTrigger\"\n [ngStyle]=\"rowStyles | igxGridRowStyles:rowData:rowIndex:pipeTrigger\"#row #pinnedRow>\n </igx-grid-row>\n </ng-template>\n <ng-template #group_template let-rowIndex=\"index\" let-rowData>\n <igx-grid-groupby-row [gridID]=\"id\" [index]=\"rowIndex\" [groupRow]=\"rowData\" [hideGroupRowSelectors]=\"hideRowSelectors\" [rowDraggable]=\"rowDraggable\" #row>\n </igx-grid-groupby-row>\n </ng-template>\n <ng-template #summary_template let-rowIndex=\"index\" let-rowData>\n <igx-grid-summary-row role=\"row\" [gridID]=\"id\" [summaries]=\"rowData.summaries\" [index]=\"rowIndex\"\n class=\"igx-grid__summaries--body\" #summaryRow>\n </igx-grid-summary-row>\n </ng-template>\n <ng-template #detail_template_container let-rowIndex=\"index\" let-rowData>\n <div detail='true' style=\"overflow: auto; width: 100%;\" id=\"{{id}}_{{rowIndex}}\" (pointerdown)='detailsViewFocused(detailsContainer, rowIndex)' #detailsContainer [attr.data-rowindex]='rowIndex'\n [ngClass]=\"{\n 'igx-grid__tr-container': true,\n 'igx-grid__tr-container--active': isDetailActive(rowIndex)\n }\">\n <div class=\"igx-grid__hierarchical-indent\" style='display: flex;'>\n <ng-container *ngIf=\"this.groupingExpressions.length > 0\">\n <div class=\"igx-grid__row-indentation igx-grid__row-indentation--level-{{groupingExpressions.length}}\"></div>\n </ng-container>\n <ng-template\n [ngTemplateOutlet]='detailTemplate'\n [ngTemplateOutletContext]='getDetailsContext(rowData, rowIndex)'>\n </ng-template>\n </div>\n </div>\n </ng-template>\n\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n <div class=\"igx-grid__row-editing-outlet\" igxOverlayOutlet #igxRowEditingOverlayOutlet></div>\n <igc-trial-watermark></igc-trial-watermark>\n </div>\n <div igxToggle #loadingOverlay>\n <igx-circular-bar [indeterminate]=\"true\" *ngIf='shouldOverlayLoading'>\n </igx-circular-bar>\n </div>\n <span *ngIf=\"hasMovableColumns && columnInDrag\" [igxColumnMovingDrop]=\"headerContainer\" [attr.droppable]=\"true\"\n id=\"right\" class=\"igx-grid__scroll-on-drag-right\"></span>\n <div [hidden]='!hasVerticalScroll()' class=\"igx-grid__tbody-scrollbar\" [style.width.px]=\"scrollSize\" (pointerdown)=\"$event.preventDefault()\">\n <div class=\"igx-grid__tbody-scrollbar-start\" [style.height.px]=' isRowPinningToTop ? pinnedRowHeight : 0'></div>\n <div class=\"igx-grid__tbody-scrollbar-main\" [style.height.px]='calcHeight'>\n <ng-template igxGridFor [igxGridForOf]='[]' #verticalScrollHolder></ng-template>\n </div>\n <div class=\"igx-grid__tbody-scrollbar-end\" [style.height.px]='!isRowPinningToTop ? pinnedRowHeight : 0'></div>\n </div>\n\n <div class=\"igx-grid__addrow-snackbar\">\n <igx-snackbar #addRowSnackbar [outlet]=\"igxBodyOverlayOutlet\" [actionText]=\"resourceStrings.igx_grid_snackbar_addrow_actiontext\" [displayTime]='snackbarDisplayTime'>{{resourceStrings.igx_grid_snackbar_addrow_label}}</igx-snackbar>\n </div>\n\n <div #igxBodyOverlayOutlet=\"overlay-outlet\" igxOverlayOutlet></div>\n</div>\n\n\n<div class=\"igx-grid__tfoot\" role=\"rowgroup\" [style.height.px]='summariesHeight' #tfoot>\n <div tabindex=\"0\" (focus)=\"navigation.focusFirstCell(false)\" (keydown)=\"navigation.summaryNav($event)\" [attr.aria-activedescendant]=\"activeDescendant\">\n <igx-grid-summary-row [style.width.px]='calcWidth' [style.height.px]='summariesHeight'\n *ngIf=\"hasSummarizedColumns && rootSummariesEnabled\" [gridID]=\"id\" role=\"row\"\n [summaries]=\"id | igxGridSummaryDataPipe:summaryService.retriggerRootPipe\" [index]=\"dataView.length\"\n class=\"igx-grid__summaries\" #summaryRow>\n </igx-grid-summary-row>\n <div class=\"igx-grid__tfoot-thumb\" [hidden]='!hasVerticalScroll()' [style.height.px]='summariesHeight'\n [style.width.px]=\"scrollSize\"></div>\n </div>\n</div>\n\n<div class=\"igx-grid__scroll\" [style.height.px]=\"scrollSize\" #scr [hidden]=\"isHorizontalScrollHidden\" (pointerdown)=\"$event.preventDefault()\">\n <div class=\"igx-grid__scroll-start\" [style.width.px]='isPinningToStart ? pinnedWidth : headerFeaturesWidth' [style.min-width.px]='isPinningToStart ? pinnedWidth : headerFeaturesWidth'></div>\n <div class=\"igx-grid__scroll-main\" [style.width.px]='unpinnedWidth'>\n <ng-template igxGridFor [igxGridForOf]='EMPTY_DATA' #scrollContainer>\n </ng-template>\n </div>\n <div class=\"igx-grid__scroll-end\" [style.float]='\"right\"' [style.width.px]='pinnedWidth' [style.min-width.px]='pinnedWidth' [hidden]=\"pinnedWidth === 0 || isPinningToStart\"></div>\n</div>\n\n<div class=\"igx-grid__footer\" #footer>\n <ng-content select=\"igx-grid-footer\"></ng-content>\n <ng-container *ngIf=\"totalRecords || pagingMode === 1\">\n <ng-content select=\"igx-paginator\"></ng-content>\n </ng-container>\n</div>\n\n<ng-template #emptyFilteredGrid>\n <span class=\"igx-grid__tbody-message\" role=\"cell\">\n <span>{{emptyFilteredGridMessage}}</span>\n <span *ngIf='showAddButton'>\n <ng-container *ngTemplateOutlet='addRowEmptyTemplate || defaultAddRowEmptyTemplate'></ng-container>\n </span>\n </span>\n</ng-template>\n\n<ng-template #defaultEmptyGrid>\n <span class=\"igx-grid__tbody-message\" role=\"cell\">\n <span>{{emptyGridMessage}}</span>\n <span *ngIf='showAddButton'>\n <ng-container *ngTemplateOutlet='addRowEmptyTemplate || defaultAddRowEmptyTemplate'></ng-container>\n </span>\n </span>\n</ng-template>\n\n<ng-template #defaultAddRowEmptyTemplate>\n <button igxButton=\"raised\" igxRipple (click)=\"this.crudService.enterAddRowMode(null, false, $event)\">\n {{resourceStrings.igx_grid_add_row_label}}\n </button>\n</ng-template>\n\n<ng-template #defaultLoadingGrid>\n <div class=\"igx-grid__loading\">\n <igx-circular-bar [indeterminate]=\"true\">\n </igx-circular-bar>\n </div>\n</ng-template>\n\n<ng-template #defaultExpandedTemplate>\n <igx-icon role=\"button\" class=\"igx-grid__group-expand-btn\"\n [ngClass]=\"{\n 'igx-grid__group-expand-btn--push': filteringService.isFilterRowVisible\n}\">unfold_less</igx-icon>\n</ng-template>\n\n <ng-template #defaultCollapsedTemplate>\n <igx-icon role=\"button\" class=\"igx-grid__group-expand-btn\"\n [ngClass]=\"{\n 'igx-grid__group-expand-btn--push': filteringService.isFilterRowVisible\n}\">unfold_more</igx-icon>\n</ng-template>\n\n<div *ngIf=\"rowEditable\" igxToggle #rowEditingOverlay>\n <div [className]=\"bannerClass\">\n <ng-container\n *ngTemplateOutlet=\"rowEditContainer; context: { rowChangesCount: rowChangesCount, endEdit: this.endEdit.bind(this) }\">\n </ng-container>\n </div>\n</div>\n\n<ng-template #defaultRowEditText>\n You have {{ rowChangesCount }} changes in this row\n</ng-template>\n\n<ng-template #defaultRowEditActions>\n <button igxButton igxRowEditTabStop (click)=\"this.endRowEditTabStop(false, $event)\">{{ this.resourceStrings.igx_grid_row_edit_btn_cancel }}</button>\n <button igxButton igxRowEditTabStop (click)=\"this.endRowEditTabStop(true, $event)\">{{ this.resourceStrings.igx_grid_row_edit_btn_done }}</button>\n</ng-template>\n\n<ng-template #defaultRowEditTemplate>\n <div class=\"igx-banner__message\">\n <span class=\"igx-banner__text\">\n <ng-container\n *ngTemplateOutlet=\"this.crudService.row?.getClassName() === 'IgxAddRow' ? rowAddText : rowEditText ? rowEditText : defaultRowEditText;\n context: { $implicit: this.crudService.row?.getClassName() !== 'IgxAddRow' ? rowChangesCount : null }\">\n </ng-container>\n </span>\n </div>\n <div class=\"igx-banner__actions\">\n <div class=\"igx-banner__row\">\n <ng-container\n *ngTemplateOutlet=\"rowEditActions ? rowEditActions : defaultRowEditActions; context: { $implicit: this.endEdit.bind(this) }\">\n </ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #dragIndicatorIconBase>\n <igx-icon>drag_indicator</igx-icon>\n</ng-template>\n\n<igx-grid-column-resizer *ngIf=\"colResizingService.showResizer\"></igx-grid-column-resizer>\n<div class=\"igx-grid__loading-outlet\" #igxLoadingOverlayOutlet igxOverlayOutlet></div>\n<div class=\"igx-grid__outlet\" #igxFilteringOverlayOutlet igxOverlayOutlet></div>\n"
|
|
69699
69979
|
},] }
|
|
69700
69980
|
];
|
|
69701
69981
|
IgxGridComponent.propDecorators = {
|
|
@@ -69721,6 +70001,7 @@
|
|
|
69721
70001
|
groupingExpressions: [{ type: i0.Input }],
|
|
69722
70002
|
groupingExpansionState: [{ type: i0.Input }],
|
|
69723
70003
|
hideGroupedColumns: [{ type: i0.Input }],
|
|
70004
|
+
groupStrategy: [{ type: i0.Input }],
|
|
69724
70005
|
dropAreaMessage: [{ type: i0.Input }],
|
|
69725
70006
|
showGroupArea: [{ type: i0.Input }]
|
|
69726
70007
|
};
|
|
@@ -71459,7 +71740,7 @@
|
|
|
71459
71740
|
function IgxGridGroupingPipe(gridAPI) {
|
|
71460
71741
|
this.gridAPI = gridAPI;
|
|
71461
71742
|
}
|
|
71462
|
-
IgxGridGroupingPipe.prototype.transform = function (collection, expression, expansion, defaultExpanded, id, groupsRecords, _pipeTrigger) {
|
|
71743
|
+
IgxGridGroupingPipe.prototype.transform = function (collection, expression, expansion, groupingStrategy, defaultExpanded, id, groupsRecords, _pipeTrigger) {
|
|
71463
71744
|
var state = { expressions: [], expansion: [], defaultExpanded: defaultExpanded };
|
|
71464
71745
|
var grid = this.gridAPI.grid;
|
|
71465
71746
|
state.expressions = grid.groupingExpressions;
|
|
@@ -71476,7 +71757,7 @@
|
|
|
71476
71757
|
else {
|
|
71477
71758
|
state.expansion = grid.groupingExpansionState;
|
|
71478
71759
|
state.defaultExpanded = grid.groupsExpanded;
|
|
71479
|
-
result = DataUtil.group(cloneArray(collection), state, grid, groupsRecords, fullResult);
|
|
71760
|
+
result = DataUtil.group(cloneArray(collection), state, groupingStrategy, grid, groupsRecords, fullResult);
|
|
71480
71761
|
}
|
|
71481
71762
|
grid.groupingFlatResult = result.data;
|
|
71482
71763
|
grid.groupingResult = fullResult.data;
|
|
@@ -81799,6 +82080,16 @@
|
|
|
81799
82080
|
* @hidden
|
|
81800
82081
|
*/
|
|
81801
82082
|
_this.isVisibleChange = new i0.EventEmitter();
|
|
82083
|
+
_this._position = 'bottom';
|
|
82084
|
+
_this._positionSettings = {
|
|
82085
|
+
horizontalDirection: exports.HorizontalAlignment.Center,
|
|
82086
|
+
verticalDirection: exports.VerticalAlignment.Bottom,
|
|
82087
|
+
openAnimation: i1.useAnimation(fadeIn),
|
|
82088
|
+
closeAnimation: i1.useAnimation(fadeOut),
|
|
82089
|
+
};
|
|
82090
|
+
return _this;
|
|
82091
|
+
}
|
|
82092
|
+
Object.defineProperty(IgxToastComponent.prototype, "position", {
|
|
81802
82093
|
/**
|
|
81803
82094
|
* Sets/gets the position of the toast.
|
|
81804
82095
|
* If not set, the `position` attribute will have value `IgxToastPosition.Bottom`.
|
|
@@ -81811,19 +82102,18 @@
|
|
|
81811
82102
|
*
|
|
81812
82103
|
* @memberof IgxToastComponent
|
|
81813
82104
|
*/
|
|
81814
|
-
|
|
81815
|
-
|
|
81816
|
-
|
|
81817
|
-
|
|
81818
|
-
|
|
81819
|
-
|
|
81820
|
-
|
|
81821
|
-
|
|
81822
|
-
|
|
81823
|
-
|
|
81824
|
-
|
|
81825
|
-
|
|
81826
|
-
}
|
|
82105
|
+
get: function () {
|
|
82106
|
+
return this._position;
|
|
82107
|
+
},
|
|
82108
|
+
set: function (position) {
|
|
82109
|
+
if (position) {
|
|
82110
|
+
this._position = position;
|
|
82111
|
+
this._positionSettings.verticalDirection = this.calculatePosition();
|
|
82112
|
+
}
|
|
82113
|
+
},
|
|
82114
|
+
enumerable: false,
|
|
82115
|
+
configurable: true
|
|
82116
|
+
});
|
|
81827
82117
|
Object.defineProperty(IgxToastComponent.prototype, "positionSettings", {
|
|
81828
82118
|
/**
|
|
81829
82119
|
* Get the position and animation settings used by the toast.
|
|
@@ -81884,10 +82174,13 @@
|
|
|
81884
82174
|
* this.toast.open();
|
|
81885
82175
|
* ```
|
|
81886
82176
|
*/
|
|
81887
|
-
IgxToastComponent.prototype.open = function (message) {
|
|
82177
|
+
IgxToastComponent.prototype.open = function (message, settings) {
|
|
81888
82178
|
if (message !== undefined) {
|
|
81889
82179
|
this.textMessage = message;
|
|
81890
82180
|
}
|
|
82181
|
+
if (settings !== undefined) {
|
|
82182
|
+
this.positionSettings = settings;
|
|
82183
|
+
}
|
|
81891
82184
|
this.strategy = new GlobalPositionStrategy(this.positionSettings);
|
|
81892
82185
|
_super.prototype.open.call(this);
|
|
81893
82186
|
};
|
|
@@ -81920,6 +82213,18 @@
|
|
|
81920
82213
|
_this.isVisibleChange.emit(closedEventArgs);
|
|
81921
82214
|
});
|
|
81922
82215
|
};
|
|
82216
|
+
IgxToastComponent.prototype.ngOnChanges = function (changes) {
|
|
82217
|
+
if (changes['position'] && this._positionSettings) {
|
|
82218
|
+
this._positionSettings.verticalDirection = this.calculatePosition();
|
|
82219
|
+
}
|
|
82220
|
+
};
|
|
82221
|
+
IgxToastComponent.prototype.calculatePosition = function () {
|
|
82222
|
+
return this.position === 'bottom'
|
|
82223
|
+
? exports.VerticalAlignment.Bottom
|
|
82224
|
+
: this.position === 'middle'
|
|
82225
|
+
? exports.VerticalAlignment.Middle
|
|
82226
|
+
: exports.VerticalAlignment.Top;
|
|
82227
|
+
};
|
|
81923
82228
|
return IgxToastComponent;
|
|
81924
82229
|
}(IgxNotificationsDirective));
|
|
81925
82230
|
IgxToastComponent.decorators = [
|
|
@@ -81942,6 +82247,9 @@
|
|
|
81942
82247
|
position: [{ type: i0.Input }],
|
|
81943
82248
|
positionSettings: [{ type: i0.Input }]
|
|
81944
82249
|
};
|
|
82250
|
+
__decorate([
|
|
82251
|
+
DeprecateProperty('`position` is deprecated. We suggest using `positionSettings` property instead.')
|
|
82252
|
+
], IgxToastComponent.prototype, "position", null);
|
|
81945
82253
|
/**
|
|
81946
82254
|
* @hidden
|
|
81947
82255
|
*/
|
|
@@ -85985,6 +86293,8 @@
|
|
|
85985
86293
|
exports.IgxSelectItemComponent = IgxSelectItemComponent;
|
|
85986
86294
|
exports.IgxSelectModule = IgxSelectModule;
|
|
85987
86295
|
exports.IgxSelectToggleIconDirective = IgxSelectToggleIconDirective;
|
|
86296
|
+
exports.IgxSimpleComboComponent = IgxSimpleComboComponent;
|
|
86297
|
+
exports.IgxSimpleComboModule = IgxSimpleComboModule;
|
|
85988
86298
|
exports.IgxSlideComponent = IgxSlideComponent;
|
|
85989
86299
|
exports.IgxSliderComponent = IgxSliderComponent;
|
|
85990
86300
|
exports.IgxSliderModule = IgxSliderModule;
|
|
@@ -86211,172 +86521,173 @@
|
|
|
86211
86521
|
exports.ɵbk = IgxCarouselIndicatorDirective;
|
|
86212
86522
|
exports.ɵbl = IgxCarouselNextButtonDirective;
|
|
86213
86523
|
exports.ɵbm = IgxCarouselPrevButtonDirective;
|
|
86214
|
-
exports.ɵbn =
|
|
86215
|
-
exports.ɵ
|
|
86216
|
-
exports.ɵbq =
|
|
86217
|
-
exports.ɵbr =
|
|
86218
|
-
exports.ɵbs =
|
|
86219
|
-
exports.ɵbt =
|
|
86220
|
-
exports.ɵbu =
|
|
86221
|
-
exports.ɵbv =
|
|
86222
|
-
exports.ɵbw =
|
|
86223
|
-
exports.ɵbx =
|
|
86224
|
-
exports.ɵby =
|
|
86225
|
-
exports.ɵbz =
|
|
86226
|
-
exports.ɵca =
|
|
86227
|
-
exports.ɵcb =
|
|
86228
|
-
exports.ɵcc =
|
|
86229
|
-
exports.ɵcd =
|
|
86230
|
-
exports.ɵce =
|
|
86231
|
-
exports.ɵcf =
|
|
86232
|
-
exports.ɵcg =
|
|
86233
|
-
exports.ɵch =
|
|
86234
|
-
exports.ɵci =
|
|
86235
|
-
exports.ɵcj =
|
|
86236
|
-
exports.ɵck =
|
|
86237
|
-
exports.ɵcl =
|
|
86238
|
-
exports.ɵcm =
|
|
86239
|
-
exports.ɵcn =
|
|
86240
|
-
exports.ɵco =
|
|
86241
|
-
exports.ɵcp =
|
|
86242
|
-
exports.ɵcq =
|
|
86243
|
-
exports.ɵcr =
|
|
86244
|
-
exports.ɵcs =
|
|
86245
|
-
exports.ɵct =
|
|
86246
|
-
exports.ɵcu =
|
|
86247
|
-
exports.ɵcv =
|
|
86248
|
-
exports.ɵcw =
|
|
86249
|
-
exports.ɵcx =
|
|
86250
|
-
exports.ɵcy =
|
|
86251
|
-
exports.ɵcz =
|
|
86524
|
+
exports.ɵbn = IGX_COMBO_COMPONENT;
|
|
86525
|
+
exports.ɵbp = IgxComboBaseDirective;
|
|
86526
|
+
exports.ɵbq = IgxComboHeaderDirective;
|
|
86527
|
+
exports.ɵbr = IgxComboFooterDirective;
|
|
86528
|
+
exports.ɵbs = IgxComboItemDirective;
|
|
86529
|
+
exports.ɵbt = IgxComboEmptyDirective;
|
|
86530
|
+
exports.ɵbu = IgxComboHeaderItemDirective;
|
|
86531
|
+
exports.ɵbv = IgxComboAddItemDirective;
|
|
86532
|
+
exports.ɵbw = IgxComboToggleIconDirective;
|
|
86533
|
+
exports.ɵbx = IgxComboClearIconDirective;
|
|
86534
|
+
exports.ɵby = IgxComboAPIService;
|
|
86535
|
+
exports.ɵbz = IgxComboDropDownComponent;
|
|
86536
|
+
exports.ɵca = IgxComboItemComponent;
|
|
86537
|
+
exports.ɵcb = IgxComboFilteringPipe;
|
|
86538
|
+
exports.ɵcc = IgxComboGroupingPipe;
|
|
86539
|
+
exports.ɵcd = IgxComboAddItemComponent;
|
|
86540
|
+
exports.ɵce = PickerBaseDirective;
|
|
86541
|
+
exports.ɵcf = IgxCalendarContainerComponent;
|
|
86542
|
+
exports.ɵcg = IgxCalendarContainerModule;
|
|
86543
|
+
exports.ɵch = IgxDialogTitleDirective;
|
|
86544
|
+
exports.ɵci = IgxDialogActionsDirective;
|
|
86545
|
+
exports.ɵcj = IgxCellCrudState;
|
|
86546
|
+
exports.ɵck = IgxRowCrudState;
|
|
86547
|
+
exports.ɵcl = IgxRowAddCrudState;
|
|
86548
|
+
exports.ɵcm = IgxGridCRUDService;
|
|
86549
|
+
exports.ɵcn = IgxColumnMovingService;
|
|
86550
|
+
exports.ɵco = IgxExcelStyleCustomDialogComponent;
|
|
86551
|
+
exports.ɵcp = IgxExcelStyleDefaultExpressionComponent;
|
|
86552
|
+
exports.ɵcq = IgxExcelStyleDateExpressionComponent;
|
|
86553
|
+
exports.ɵcr = HammerGesturesManager;
|
|
86554
|
+
exports.ɵcs = WatchChanges;
|
|
86555
|
+
exports.ɵct = WatchColumnChanges;
|
|
86556
|
+
exports.ɵcu = notifyChanges;
|
|
86557
|
+
exports.ɵcv = IgxNotificationsDirective;
|
|
86558
|
+
exports.ɵcw = IgxGridColumnResizerComponent;
|
|
86559
|
+
exports.ɵcx = IgxColumnResizerDirective;
|
|
86560
|
+
exports.ɵcy = IgxColumnResizingService;
|
|
86561
|
+
exports.ɵcz = IgxRowSelectorDirective;
|
|
86252
86562
|
exports.ɵd = IgxGridSelectionService;
|
|
86253
|
-
exports.ɵda =
|
|
86254
|
-
exports.ɵdb =
|
|
86255
|
-
exports.ɵdc =
|
|
86256
|
-
exports.ɵdd =
|
|
86257
|
-
exports.ɵde =
|
|
86258
|
-
exports.ɵdf =
|
|
86259
|
-
exports.ɵdg =
|
|
86260
|
-
exports.ɵdh =
|
|
86261
|
-
exports.ɵdi =
|
|
86262
|
-
exports.ɵdj =
|
|
86263
|
-
exports.ɵdk =
|
|
86264
|
-
exports.ɵdl =
|
|
86265
|
-
exports.ɵdm =
|
|
86266
|
-
exports.ɵdn =
|
|
86267
|
-
exports.ɵdo =
|
|
86268
|
-
exports.ɵdp =
|
|
86269
|
-
exports.ɵdq =
|
|
86270
|
-
exports.ɵdr =
|
|
86271
|
-
exports.ɵds =
|
|
86272
|
-
exports.ɵdt =
|
|
86273
|
-
exports.ɵdu =
|
|
86274
|
-
exports.ɵdv =
|
|
86275
|
-
exports.ɵdw =
|
|
86276
|
-
exports.ɵdx =
|
|
86277
|
-
exports.ɵdy =
|
|
86278
|
-
exports.ɵdz =
|
|
86279
|
-
exports.ɵea =
|
|
86280
|
-
exports.ɵeb =
|
|
86281
|
-
exports.ɵec =
|
|
86282
|
-
exports.ɵed =
|
|
86283
|
-
exports.ɵee =
|
|
86284
|
-
exports.ɵef =
|
|
86285
|
-
exports.ɵeg =
|
|
86286
|
-
exports.ɵeh =
|
|
86287
|
-
exports.ɵei =
|
|
86288
|
-
exports.ɵej =
|
|
86289
|
-
exports.ɵek =
|
|
86290
|
-
exports.ɵel =
|
|
86291
|
-
exports.ɵem =
|
|
86292
|
-
exports.ɵen =
|
|
86293
|
-
exports.ɵeo =
|
|
86294
|
-
exports.ɵep =
|
|
86295
|
-
exports.ɵeq =
|
|
86296
|
-
exports.ɵer =
|
|
86297
|
-
exports.ɵes =
|
|
86298
|
-
exports.ɵet =
|
|
86299
|
-
exports.ɵ
|
|
86300
|
-
exports.ɵew =
|
|
86301
|
-
exports.ɵex =
|
|
86302
|
-
exports.ɵey =
|
|
86303
|
-
exports.ɵez =
|
|
86563
|
+
exports.ɵda = IgxGroupByRowSelectorDirective;
|
|
86564
|
+
exports.ɵdb = IgxHeadSelectorDirective;
|
|
86565
|
+
exports.ɵdc = IgxRowDragDirective;
|
|
86566
|
+
exports.ɵdd = IgxDragIndicatorIconDirective;
|
|
86567
|
+
exports.ɵde = IgxRowDragGhostDirective;
|
|
86568
|
+
exports.ɵdf = IgxRowDragModule;
|
|
86569
|
+
exports.ɵdg = IgxGridHeaderRowComponent;
|
|
86570
|
+
exports.ɵdh = IgxGridHeaderGroupComponent;
|
|
86571
|
+
exports.ɵdi = IgxGridHeaderComponent;
|
|
86572
|
+
exports.ɵdj = IgxGridFilteringCellComponent;
|
|
86573
|
+
exports.ɵdk = IgxFilteringService;
|
|
86574
|
+
exports.ɵdl = IgxGridFilteringRowComponent;
|
|
86575
|
+
exports.ɵdm = IgxGridGroupByAreaComponent;
|
|
86576
|
+
exports.ɵdn = IgxGroupByAreaDirective;
|
|
86577
|
+
exports.ɵdo = IgxGroupByMetaPipe;
|
|
86578
|
+
exports.ɵdp = IgxTemplateOutletDirective;
|
|
86579
|
+
exports.ɵdq = IgxTemplateOutletModule;
|
|
86580
|
+
exports.ɵdr = IgxRowEditTemplateDirective;
|
|
86581
|
+
exports.ɵds = IgxRowEditTextDirective;
|
|
86582
|
+
exports.ɵdt = IgxRowAddTextDirective;
|
|
86583
|
+
exports.ɵdu = IgxRowEditActionsDirective;
|
|
86584
|
+
exports.ɵdv = IgxRowEditTabStopDirective;
|
|
86585
|
+
exports.ɵdw = IgxSummaryRowComponent;
|
|
86586
|
+
exports.ɵdx = IgxSummaryCellComponent;
|
|
86587
|
+
exports.ɵdy = IgxRowDirective;
|
|
86588
|
+
exports.ɵdz = IgxGridNavigationService;
|
|
86589
|
+
exports.ɵea = IgxGridSummaryService;
|
|
86590
|
+
exports.ɵeb = ConnectedPositioningStrategy;
|
|
86591
|
+
exports.ɵec = IgxGridGroupByRowComponent;
|
|
86592
|
+
exports.ɵed = IgxTreeGridSelectionService;
|
|
86593
|
+
exports.ɵee = IgxTreeGridGroupByAreaComponent;
|
|
86594
|
+
exports.ɵef = IgxRowLoadingIndicatorTemplateDirective;
|
|
86595
|
+
exports.ɵeg = IgxHierarchicalGridNavigationService;
|
|
86596
|
+
exports.ɵeh = IgxChildGridRowComponent;
|
|
86597
|
+
exports.ɵei = IgxGridCellComponent;
|
|
86598
|
+
exports.ɵej = IgxGridFooterComponent;
|
|
86599
|
+
exports.ɵek = IgxAdvancedFilteringDialogComponent;
|
|
86600
|
+
exports.ɵel = IgxColumnHidingDirective;
|
|
86601
|
+
exports.ɵem = IgxColumnPinningDirective;
|
|
86602
|
+
exports.ɵen = IgxGridSharedModules;
|
|
86603
|
+
exports.ɵeo = IgxProcessBarTextTemplateDirective;
|
|
86604
|
+
exports.ɵep = IgxProgressBarGradientDirective;
|
|
86605
|
+
exports.ɵeq = DIR_DOCUMENT_FACTORY;
|
|
86606
|
+
exports.ɵer = DIR_DOCUMENT;
|
|
86607
|
+
exports.ɵes = IgxDirectionality;
|
|
86608
|
+
exports.ɵet = IgxSelectItemNavigationDirective;
|
|
86609
|
+
exports.ɵeu = IGX_TIME_PICKER_COMPONENT;
|
|
86610
|
+
exports.ɵew = IgxItemListDirective;
|
|
86611
|
+
exports.ɵex = IgxTimeItemDirective;
|
|
86612
|
+
exports.ɵey = IgxTimePickerTemplateDirective;
|
|
86613
|
+
exports.ɵez = IgxTimePickerActionsDirective;
|
|
86304
86614
|
exports.ɵf = IGX_EXPANSION_PANEL_COMPONENT;
|
|
86305
|
-
exports.ɵfa =
|
|
86306
|
-
exports.ɵfb =
|
|
86307
|
-
exports.ɵfc =
|
|
86308
|
-
exports.ɵfd =
|
|
86309
|
-
exports.ɵfe =
|
|
86310
|
-
exports.ɵff =
|
|
86311
|
-
exports.ɵfg =
|
|
86312
|
-
exports.ɵfh =
|
|
86313
|
-
exports.ɵfi =
|
|
86314
|
-
exports.ɵfj =
|
|
86315
|
-
exports.ɵfk =
|
|
86316
|
-
exports.ɵfl =
|
|
86317
|
-
exports.ɵfm =
|
|
86318
|
-
exports.ɵfn =
|
|
86319
|
-
exports.ɵfo =
|
|
86320
|
-
exports.ɵfp =
|
|
86321
|
-
exports.ɵfq =
|
|
86322
|
-
exports.ɵfr =
|
|
86323
|
-
exports.ɵfs =
|
|
86324
|
-
exports.ɵft =
|
|
86325
|
-
exports.ɵfu =
|
|
86326
|
-
exports.ɵfv =
|
|
86327
|
-
exports.ɵfw =
|
|
86328
|
-
exports.ɵfx =
|
|
86329
|
-
exports.ɵfy =
|
|
86330
|
-
exports.ɵfz =
|
|
86615
|
+
exports.ɵfa = TimeFormatPipe;
|
|
86616
|
+
exports.ɵfb = TimeItemPipe;
|
|
86617
|
+
exports.ɵfc = IgxGridPipesModule;
|
|
86618
|
+
exports.ɵfd = IgxGridCellStyleClassesPipe;
|
|
86619
|
+
exports.ɵfe = IgxGridCellStylesPipe;
|
|
86620
|
+
exports.ɵff = IgxGridRowClassesPipe;
|
|
86621
|
+
exports.ɵfg = IgxGridRowStylesPipe;
|
|
86622
|
+
exports.ɵfh = IgxGridNotGroupedPipe;
|
|
86623
|
+
exports.ɵfi = IgxGridTopLevelColumns;
|
|
86624
|
+
exports.ɵfj = IgxGridFilterConditionPipe;
|
|
86625
|
+
exports.ɵfk = IgxGridTransactionPipe;
|
|
86626
|
+
exports.ɵfl = IgxGridPaginatorOptionsPipe;
|
|
86627
|
+
exports.ɵfm = IgxHasVisibleColumnsPipe;
|
|
86628
|
+
exports.ɵfn = IgxGridRowPinningPipe;
|
|
86629
|
+
exports.ɵfo = IgxColumnActionEnabledPipe;
|
|
86630
|
+
exports.ɵfp = IgxFilterActionColumnsPipe;
|
|
86631
|
+
exports.ɵfq = IgxSortActionColumnsPipe;
|
|
86632
|
+
exports.ɵfr = IgxGridDataMapperPipe;
|
|
86633
|
+
exports.ɵfs = IgxStringReplacePipe;
|
|
86634
|
+
exports.ɵft = IgxGridTransactionStatePipe;
|
|
86635
|
+
exports.ɵfu = IgxColumnFormatterPipe;
|
|
86636
|
+
exports.ɵfv = IgxSummaryFormatterPipe;
|
|
86637
|
+
exports.ɵfw = IgxGridAddRowPipe;
|
|
86638
|
+
exports.ɵfx = IgxHeaderGroupWidthPipe;
|
|
86639
|
+
exports.ɵfy = IgxHeaderGroupStylePipe;
|
|
86640
|
+
exports.ɵfz = IgxGridColumnModule;
|
|
86331
86641
|
exports.ɵg = IGX_TREE_COMPONENT;
|
|
86332
|
-
exports.ɵga =
|
|
86333
|
-
exports.ɵgb =
|
|
86334
|
-
exports.ɵgc =
|
|
86335
|
-
exports.ɵgd =
|
|
86336
|
-
exports.ɵge =
|
|
86337
|
-
exports.ɵgf =
|
|
86338
|
-
exports.ɵgg =
|
|
86339
|
-
exports.ɵgh =
|
|
86340
|
-
exports.ɵgi =
|
|
86341
|
-
exports.ɵgj =
|
|
86342
|
-
exports.ɵgk =
|
|
86343
|
-
exports.ɵgl =
|
|
86344
|
-
exports.ɵgm =
|
|
86345
|
-
exports.ɵgn =
|
|
86346
|
-
exports.ɵgo =
|
|
86347
|
-
exports.ɵgp =
|
|
86348
|
-
exports.ɵgq =
|
|
86349
|
-
exports.ɵgr =
|
|
86350
|
-
exports.ɵgs =
|
|
86351
|
-
exports.ɵgt =
|
|
86352
|
-
exports.ɵgu =
|
|
86353
|
-
exports.ɵgv =
|
|
86354
|
-
exports.ɵgw =
|
|
86355
|
-
exports.ɵgx =
|
|
86356
|
-
exports.ɵgy =
|
|
86357
|
-
exports.ɵgz =
|
|
86642
|
+
exports.ɵga = IgxGridHeadersModule;
|
|
86643
|
+
exports.ɵgb = SortingIndexPipe;
|
|
86644
|
+
exports.ɵgc = IgxGridFilteringModule;
|
|
86645
|
+
exports.ɵgd = IgxColumnMovingModule;
|
|
86646
|
+
exports.ɵge = IgxColumnMovingDropDirective;
|
|
86647
|
+
exports.ɵgf = IgxColumnMovingDragDirective;
|
|
86648
|
+
exports.ɵgg = IgxGridResizingModule;
|
|
86649
|
+
exports.ɵgh = IgxResizeHandleDirective;
|
|
86650
|
+
exports.ɵgi = IgxGridExcelStyleFilteringModule;
|
|
86651
|
+
exports.ɵgj = IgxGridSelectionModule;
|
|
86652
|
+
exports.ɵgk = IgxGridDragSelectDirective;
|
|
86653
|
+
exports.ɵgl = IgxGridSummaryModule;
|
|
86654
|
+
exports.ɵgm = IgxSummaryDataPipe;
|
|
86655
|
+
exports.ɵgn = IgxGridToolbarModule;
|
|
86656
|
+
exports.ɵgo = BaseToolbarDirective;
|
|
86657
|
+
exports.ɵgp = BaseToolbarColumnActionsDirective;
|
|
86658
|
+
exports.ɵgq = IgxGridRowComponent;
|
|
86659
|
+
exports.ɵgr = IgxGridSortingPipe;
|
|
86660
|
+
exports.ɵgs = IgxGridGroupingPipe;
|
|
86661
|
+
exports.ɵgt = IgxGridPagingPipe;
|
|
86662
|
+
exports.ɵgu = IgxGridFilteringPipe;
|
|
86663
|
+
exports.ɵgv = IgxGridSummaryPipe;
|
|
86664
|
+
exports.ɵgw = IgxGridDetailsPipe;
|
|
86665
|
+
exports.ɵgx = IgxGridExpandableCellComponent;
|
|
86666
|
+
exports.ɵgy = IgxTreeGridRowComponent;
|
|
86667
|
+
exports.ɵgz = IgxTreeGridCellComponent;
|
|
86358
86668
|
exports.ɵh = IGX_TREE_NODE_COMPONENT;
|
|
86359
|
-
exports.ɵha =
|
|
86360
|
-
exports.ɵhb =
|
|
86361
|
-
exports.ɵhc =
|
|
86362
|
-
exports.ɵhd =
|
|
86363
|
-
exports.ɵhe =
|
|
86364
|
-
exports.ɵhf =
|
|
86365
|
-
exports.ɵhg =
|
|
86366
|
-
exports.ɵhh =
|
|
86367
|
-
exports.ɵhi =
|
|
86368
|
-
exports.ɵhj =
|
|
86369
|
-
exports.ɵhk =
|
|
86370
|
-
exports.ɵhl =
|
|
86371
|
-
exports.ɵhm =
|
|
86372
|
-
exports.ɵhn =
|
|
86373
|
-
exports.ɵho =
|
|
86374
|
-
exports.ɵhp =
|
|
86375
|
-
exports.ɵhq =
|
|
86376
|
-
exports.ɵhr =
|
|
86377
|
-
exports.ɵhs =
|
|
86378
|
-
exports.ɵht =
|
|
86379
|
-
exports.ɵhu =
|
|
86669
|
+
exports.ɵha = IgxTreeGridHierarchizingPipe;
|
|
86670
|
+
exports.ɵhb = IgxTreeGridFlatteningPipe;
|
|
86671
|
+
exports.ɵhc = IgxTreeGridSortingPipe;
|
|
86672
|
+
exports.ɵhd = IgxTreeGridPagingPipe;
|
|
86673
|
+
exports.ɵhe = IgxTreeGridTransactionPipe;
|
|
86674
|
+
exports.ɵhf = IgxTreeGridNormalizeRecordsPipe;
|
|
86675
|
+
exports.ɵhg = IgxTreeGridAddRowPipe;
|
|
86676
|
+
exports.ɵhh = IgxTreeGridFilteringPipe;
|
|
86677
|
+
exports.ɵhi = IgxTreeGridSummaryPipe;
|
|
86678
|
+
exports.ɵhj = IgxHierarchicalRowComponent;
|
|
86679
|
+
exports.ɵhk = IgxHierarchicalGridCellComponent;
|
|
86680
|
+
exports.ɵhl = IgxSliderThumbComponent;
|
|
86681
|
+
exports.ɵhm = IgxThumbLabelComponent;
|
|
86682
|
+
exports.ɵhn = IgxTicksComponent;
|
|
86683
|
+
exports.ɵho = IgxTickLabelsPipe;
|
|
86684
|
+
exports.ɵhp = IgxTabsBase;
|
|
86685
|
+
exports.ɵhq = IgxTabHeaderBase;
|
|
86686
|
+
exports.ɵhr = IgxTabContentBase;
|
|
86687
|
+
exports.ɵhs = IgxSplitBarComponent;
|
|
86688
|
+
exports.ɵht = IgxTreeService;
|
|
86689
|
+
exports.ɵhu = IgxTreeSelectionService;
|
|
86690
|
+
exports.ɵhv = IgxTreeNavigationService;
|
|
86380
86691
|
exports.ɵi = PlatformUtil;
|
|
86381
86692
|
exports.ɵl = IgxInputGroupBase;
|
|
86382
86693
|
exports.ɵm = IgxSelectionAPIService;
|