igniteui-angular 12.2.6 → 12.3.1
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/LICENSE +16 -0
- package/README.md +12 -11
- package/bundles/igniteui-angular.umd.js +1810 -1419
- package/bundles/igniteui-angular.umd.js.map +1 -1
- package/esm2015/igniteui-angular.js +97 -97
- package/esm2015/lib/accordion/accordion.component.js +23 -6
- 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 +1016 -2
- package/esm2015/lib/combo/combo.component.js +91 -1135
- package/esm2015/lib/combo/combo.pipes.js +3 -3
- package/esm2015/lib/data-operations/sorting-strategy.js +12 -3
- package/esm2015/lib/grids/filtering/base/grid-filtering-row.component.js +12 -4
- package/esm2015/lib/grids/filtering/excel-style/excel-style-date-expression.component.js +2 -2
- package/esm2015/lib/grids/filtering/excel-style/grid.excel-style-filtering.component.js +2 -2
- package/esm2015/lib/grids/grid-base.directive.js +2 -2
- package/esm2015/lib/grids/tree-grid/tree-grid.component.js +3 -3
- package/esm2015/lib/simple-combo/public_api.js +2 -0
- package/esm2015/lib/simple-combo/simple-combo.component.js +390 -0
- package/esm2015/public_api.js +2 -1
- package/fesm2015/igniteui-angular.js +1373 -1002
- package/fesm2015/igniteui-angular.js.map +1 -1
- package/igniteui-angular.d.ts +96 -96
- package/igniteui-angular.metadata.json +1 -1
- package/lib/accordion/accordion.component.d.ts +1 -0
- 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 +730 -4
- package/lib/combo/combo.component.d.ts +38 -791
- package/lib/combo/combo.pipes.d.ts +1 -1
- package/lib/simple-combo/public_api.d.ts +1 -0
- package/lib/simple-combo/simple-combo.component.d.ts +126 -0
- package/migrations/update-13_0_0/changes/members.json +26 -0
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/schematics/tsconfig.tsbuildinfo +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/animations'), require('@angular/core'), require('@angular/forms'), require('@angular/common'), require('rxjs'), require('rxjs/operators'), require('lodash.mergewith'), require('@juggle/resize-observer'), require('jszip'), require('@angular/platform-browser'), require('@angular/common/http'), require('@igniteui/material-icons-extended'), require('igniteui-trial-watermark'), require('uuid')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('igniteui-angular', ['exports', '@angular/animations', '@angular/core', '@angular/forms', '@angular/common', 'rxjs', 'rxjs/operators', 'lodash.mergewith', '@juggle/resize-observer', 'jszip', '@angular/platform-browser', '@angular/common/http', '@igniteui/material-icons-extended', 'igniteui-trial-watermark', 'uuid'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global[
|
|
5
|
-
}(this, (function (exports, i1, i0, forms, i2, rxjs, operators, mergeWith, resizeObserver, JSZip, i1$1, i2$1, materialIconsExtended, igniteuiTrialWatermark, uuid) { 'use strict';
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["igniteui-angular"] = {}, global.ng.animations, global.ng.core, global.ng.forms, global.ng.common, global.rxjs, global.rxjs.operators, global.mergeWith, global.ResizeObserver, global.JSZip, global.ng.platformBrowser, global.ng.common.http, global.materialIconsExtended, null, global.uuid));
|
|
5
|
+
})(this, (function (exports, i1, i0, forms, i2, rxjs, operators, mergeWith, resizeObserver, JSZip, i1$1, i2$1, materialIconsExtended, igniteuiTrialWatermark, uuid) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -15,14 +15,12 @@
|
|
|
15
15
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
16
|
Object.defineProperty(n, k, d.get ? d : {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () {
|
|
19
|
-
return e[k];
|
|
20
|
-
}
|
|
18
|
+
get: function () { return e[k]; }
|
|
21
19
|
});
|
|
22
20
|
}
|
|
23
21
|
});
|
|
24
22
|
}
|
|
25
|
-
n[
|
|
23
|
+
n["default"] = e;
|
|
26
24
|
return Object.freeze(n);
|
|
27
25
|
}
|
|
28
26
|
|
|
@@ -34,7 +32,7 @@
|
|
|
34
32
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
35
33
|
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
36
34
|
|
|
37
|
-
exports
|
|
35
|
+
exports["ɵj"] = void 0;
|
|
38
36
|
(function (EaseIn) {
|
|
39
37
|
EaseIn[EaseIn["Quad"] = "cubic-bezier(0.550, 0.085, 0.680, 0.530)"] = "Quad";
|
|
40
38
|
EaseIn[EaseIn["Cubic"] = "cubic-bezier(0.550, 0.055, 0.675, 0.190)"] = "Cubic";
|
|
@@ -44,8 +42,8 @@
|
|
|
44
42
|
EaseIn[EaseIn["Expo"] = "cubic-bezier(0.950, 0.050, 0.795, 0.035)"] = "Expo";
|
|
45
43
|
EaseIn[EaseIn["Circ"] = "cubic-bezier(0.600, 0.040, 0.980, 0.335)"] = "Circ";
|
|
46
44
|
EaseIn[EaseIn["Back"] = "cubic-bezier(0.600, -0.280, 0.735, 0.045)"] = "Back";
|
|
47
|
-
})(exports
|
|
48
|
-
exports
|
|
45
|
+
})(exports["ɵj"] || (exports["ɵj"] = {}));
|
|
46
|
+
exports["ɵk"] = void 0;
|
|
49
47
|
(function (EaseOut) {
|
|
50
48
|
EaseOut[EaseOut["Quad"] = "cubic-bezier(0.250, 0.460, 0.450, 0.940)"] = "Quad";
|
|
51
49
|
EaseOut[EaseOut["Cubic"] = "cubic-bezier(0.215, 0.610, 0.355, 1.000)"] = "Cubic";
|
|
@@ -55,7 +53,7 @@
|
|
|
55
53
|
EaseOut[EaseOut["Expo"] = "cubic-bezier(0.190, 1.000, 0.220, 1.000)"] = "Expo";
|
|
56
54
|
EaseOut[EaseOut["Circ"] = "cubic-bezier(0.075, 0.820, 0.165, 1.000)"] = "Circ";
|
|
57
55
|
EaseOut[EaseOut["Back"] = "cubic-bezier(0.175, 0.885, 0.320, 1.275)"] = "Back";
|
|
58
|
-
})(exports
|
|
56
|
+
})(exports["ɵk"] || (exports["ɵk"] = {}));
|
|
59
57
|
var EaseInOut;
|
|
60
58
|
(function (EaseInOut) {
|
|
61
59
|
EaseInOut[EaseInOut["Quad"] = "cubic-bezier(0.455, 0.030, 0.515, 0.955)"] = "Quad";
|
|
@@ -79,7 +77,7 @@
|
|
|
79
77
|
var baseParams$3 = {
|
|
80
78
|
delay: '0s',
|
|
81
79
|
duration: '350ms',
|
|
82
|
-
easing: exports
|
|
80
|
+
easing: exports["ɵk"].Sine,
|
|
83
81
|
endOpacity: 1,
|
|
84
82
|
startOpacity: 0
|
|
85
83
|
};
|
|
@@ -90,7 +88,7 @@
|
|
|
90
88
|
params: {
|
|
91
89
|
delay: '0s',
|
|
92
90
|
duration: '350ms',
|
|
93
|
-
easing: exports
|
|
91
|
+
easing: exports["ɵk"].Sine,
|
|
94
92
|
endOpacity: 0,
|
|
95
93
|
startOpacity: 1
|
|
96
94
|
}
|
|
@@ -115,7 +113,7 @@
|
|
|
115
113
|
var baseParams$2 = {
|
|
116
114
|
delay: '0s',
|
|
117
115
|
duration: '600ms',
|
|
118
|
-
easing: exports
|
|
116
|
+
easing: exports["ɵk"].Quad,
|
|
119
117
|
endAngle: 180,
|
|
120
118
|
endDistance: '0px',
|
|
121
119
|
rotateX: 1,
|
|
@@ -165,7 +163,7 @@
|
|
|
165
163
|
var baseInParams$2 = {
|
|
166
164
|
delay: '0s',
|
|
167
165
|
duration: '600ms',
|
|
168
|
-
easing: exports
|
|
166
|
+
easing: exports["ɵk"].Quad,
|
|
169
167
|
endAngle: 0,
|
|
170
168
|
endOpacity: 1,
|
|
171
169
|
rotateX: 0,
|
|
@@ -176,7 +174,7 @@
|
|
|
176
174
|
xPos: 'center',
|
|
177
175
|
yPos: 'center'
|
|
178
176
|
};
|
|
179
|
-
var baseOutParams$2 = Object.assign(Object.assign({}, baseInParams$2), { easing: exports
|
|
177
|
+
var baseOutParams$2 = Object.assign(Object.assign({}, baseInParams$2), { easing: exports["ɵj"].Quad, endOpacity: 0, startOpacity: 1 });
|
|
180
178
|
var rotateInCenter = i1.animation(baseRecipe$1, {
|
|
181
179
|
params: Object.assign({}, baseInParams$2)
|
|
182
180
|
});
|
|
@@ -465,7 +463,7 @@
|
|
|
465
463
|
delay: '0s',
|
|
466
464
|
direction: '',
|
|
467
465
|
duration: '350ms',
|
|
468
|
-
easing: exports
|
|
466
|
+
easing: exports["ɵk"].Quad,
|
|
469
467
|
endOpacity: 1,
|
|
470
468
|
fromScale: .5,
|
|
471
469
|
startOpacity: 0,
|
|
@@ -473,7 +471,7 @@
|
|
|
473
471
|
xPos: '50%',
|
|
474
472
|
yPos: '50%'
|
|
475
473
|
};
|
|
476
|
-
var baseOutParams$1 = Object.assign(Object.assign({}, baseInParams$1), { easing: exports
|
|
474
|
+
var baseOutParams$1 = Object.assign(Object.assign({}, baseInParams$1), { easing: exports["ɵk"].Sine, endOpacity: 0, fromScale: 1, startOpacity: 1, toScale: .5 });
|
|
477
475
|
var scaleInCenter = i1.animation(base$2, { params: baseInParams$1 });
|
|
478
476
|
var scaleInBl = i1.animation(base$2, {
|
|
479
477
|
params: Object.assign(Object.assign({}, baseInParams$1), { xPos: '0', yPos: '100%' })
|
|
@@ -574,7 +572,7 @@
|
|
|
574
572
|
var baseInParams = {
|
|
575
573
|
delay: '0s',
|
|
576
574
|
duration: '350ms',
|
|
577
|
-
easing: exports
|
|
575
|
+
easing: exports["ɵk"].Quad,
|
|
578
576
|
endOpacity: 1,
|
|
579
577
|
fromPosition: 'translateY(-500px)',
|
|
580
578
|
startOpacity: 0,
|
|
@@ -583,7 +581,7 @@
|
|
|
583
581
|
var baseOutParams = {
|
|
584
582
|
delay: '0s',
|
|
585
583
|
duration: '350ms',
|
|
586
|
-
easing: exports
|
|
584
|
+
easing: exports["ɵj"].Quad,
|
|
587
585
|
endOpacity: 0,
|
|
588
586
|
fromPosition: 'translateY(0)',
|
|
589
587
|
startOpacity: 1,
|
|
@@ -594,7 +592,7 @@
|
|
|
594
592
|
params: {
|
|
595
593
|
delay: '0s',
|
|
596
594
|
duration: '350ms',
|
|
597
|
-
easing: exports
|
|
595
|
+
easing: exports["ɵk"].Quad,
|
|
598
596
|
endOpacity: 1,
|
|
599
597
|
fromPosition: 'translateX(-500px)',
|
|
600
598
|
startOpacity: 0,
|
|
@@ -605,7 +603,7 @@
|
|
|
605
603
|
params: {
|
|
606
604
|
delay: '0s',
|
|
607
605
|
duration: '350ms',
|
|
608
|
-
easing: exports
|
|
606
|
+
easing: exports["ɵk"].Quad,
|
|
609
607
|
endOpacity: 1,
|
|
610
608
|
fromPosition: 'translateX(500px)',
|
|
611
609
|
startOpacity: 0,
|
|
@@ -616,7 +614,7 @@
|
|
|
616
614
|
params: {
|
|
617
615
|
delay: '0s',
|
|
618
616
|
duration: '350ms',
|
|
619
|
-
easing: exports
|
|
617
|
+
easing: exports["ɵk"].Quad,
|
|
620
618
|
endOpacity: 1,
|
|
621
619
|
fromPosition: 'translateY(500px)',
|
|
622
620
|
startOpacity: 0,
|
|
@@ -643,7 +641,7 @@
|
|
|
643
641
|
params: {
|
|
644
642
|
delay: '0s',
|
|
645
643
|
duration: '350ms',
|
|
646
|
-
easing: exports
|
|
644
|
+
easing: exports["ɵj"].Quad,
|
|
647
645
|
endOpacity: 0,
|
|
648
646
|
fromPosition: 'translateY(0)',
|
|
649
647
|
startOpacity: 1,
|
|
@@ -682,7 +680,7 @@
|
|
|
682
680
|
delay: '0s',
|
|
683
681
|
direction: 'X',
|
|
684
682
|
duration: '.5s',
|
|
685
|
-
easing: exports
|
|
683
|
+
easing: exports["ɵk"].Back,
|
|
686
684
|
endAngle: 0,
|
|
687
685
|
endOpacity: 1,
|
|
688
686
|
startAngle: -100,
|
|
@@ -690,7 +688,7 @@
|
|
|
690
688
|
xPos: 'top',
|
|
691
689
|
yPos: 'center'
|
|
692
690
|
};
|
|
693
|
-
var swingOutParams = Object.assign(Object.assign({}, swingParams), { duration: '.55s', easing: exports
|
|
691
|
+
var swingOutParams = Object.assign(Object.assign({}, swingParams), { duration: '.55s', easing: exports["ɵj"].Back, endAngle: 70, endOpacity: 0, startAngle: 0, startOpacity: 1 });
|
|
694
692
|
var swingInTopFwd = i1.animation(swingBase, {
|
|
695
693
|
params: Object.assign({}, swingParams)
|
|
696
694
|
});
|
|
@@ -753,17 +751,17 @@
|
|
|
753
751
|
var baseParams = {
|
|
754
752
|
delay: '0s',
|
|
755
753
|
duration: '350ms',
|
|
756
|
-
easing: exports
|
|
754
|
+
easing: exports["ɵj"].Quad,
|
|
757
755
|
startOpacity: 0,
|
|
758
756
|
endOpacity: 1,
|
|
759
757
|
startHeight: '',
|
|
760
758
|
endHeight: ''
|
|
761
759
|
};
|
|
762
760
|
var growVerIn = i1.animation(base, {
|
|
763
|
-
params: Object.assign(Object.assign({}, baseParams), { easing: exports
|
|
761
|
+
params: Object.assign(Object.assign({}, baseParams), { easing: exports["ɵk"].Quad, startOpacity: 0, endOpacity: 1, startHeight: '0px', endHeight: '*' })
|
|
764
762
|
});
|
|
765
763
|
var growVerOut = i1.animation(base, {
|
|
766
|
-
params: Object.assign(Object.assign({}, baseParams), { easing: exports
|
|
764
|
+
params: Object.assign(Object.assign({}, baseParams), { easing: exports["ɵk"].Quad, startOpacity: 1, endOpacity: 0, startHeight: '*', endHeight: '0px' })
|
|
767
765
|
});
|
|
768
766
|
|
|
769
767
|
/*! *****************************************************************************
|
|
@@ -1001,7 +999,7 @@
|
|
|
1001
999
|
ar[i] = from[i];
|
|
1002
1000
|
}
|
|
1003
1001
|
}
|
|
1004
|
-
return to.concat(ar || from);
|
|
1002
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
1005
1003
|
}
|
|
1006
1004
|
function __await(v) {
|
|
1007
1005
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -1344,7 +1342,7 @@
|
|
|
1344
1342
|
* @returns Obj1 with merged cloned keys from Obj2
|
|
1345
1343
|
* @hidden
|
|
1346
1344
|
*/
|
|
1347
|
-
var mergeObjects = function (obj1, obj2) { return mergeWith__default[
|
|
1345
|
+
var mergeObjects = function (obj1, obj2) { return mergeWith__default["default"](obj1, obj2, function (objValue, srcValue) {
|
|
1348
1346
|
if (Array.isArray(srcValue)) {
|
|
1349
1347
|
return objValue = srcValue;
|
|
1350
1348
|
}
|
|
@@ -2121,8 +2119,17 @@
|
|
|
2121
2119
|
finally { if (e_1) throw e_1.error; }
|
|
2122
2120
|
}
|
|
2123
2121
|
if (expanded) {
|
|
2124
|
-
|
|
2125
|
-
|
|
2122
|
+
// Replaced object destructing as in a single big group scenario
|
|
2123
|
+
// it hits the max number of arguments for a function the underlying JS engine
|
|
2124
|
+
// supports.
|
|
2125
|
+
var j = fullResult.metadata.length - group.length;
|
|
2126
|
+
for (; j < fullResult.metadata.length; j++) {
|
|
2127
|
+
metadata.push(fullResult.metadata[j]);
|
|
2128
|
+
}
|
|
2129
|
+
j = fullResult.data.length - group.length;
|
|
2130
|
+
for (; j < fullResult.data.length; j++) {
|
|
2131
|
+
result.push(fullResult.data[j]);
|
|
2132
|
+
}
|
|
2126
2133
|
}
|
|
2127
2134
|
}
|
|
2128
2135
|
i += group.length;
|
|
@@ -8601,7 +8608,7 @@
|
|
|
8601
8608
|
*/
|
|
8602
8609
|
get: function () {
|
|
8603
8610
|
if (this.inEditMode) {
|
|
8604
|
-
return mergeWith__default[
|
|
8611
|
+
return mergeWith__default["default"](cloneValue(this._rowData), this.grid.transactions.getAggregatedValue(this.rowID, false), function (objValue, srcValue) {
|
|
8605
8612
|
if (Array.isArray(srcValue)) {
|
|
8606
8613
|
return objValue = srcValue;
|
|
8607
8614
|
}
|
|
@@ -30803,6 +30810,7 @@
|
|
|
30803
30810
|
IgxAccordionComponent.prototype.ngAfterViewInit = function () {
|
|
30804
30811
|
var _this = this;
|
|
30805
30812
|
this._expandedPanels = new Set(this._panels.filter(function (panel) { return !panel.collapsed; }));
|
|
30813
|
+
this._expandingPanels = new Set();
|
|
30806
30814
|
this._panels.changes.pipe(operators.takeUntil(this._destroy$)).subscribe(function () {
|
|
30807
30815
|
_this.subToChanges();
|
|
30808
30816
|
});
|
|
@@ -30907,6 +30915,7 @@
|
|
|
30907
30915
|
this._panels.forEach(function (panel) {
|
|
30908
30916
|
panel.contentExpanded.pipe(operators.takeUntil(_this._unsubChildren$)).subscribe(function (args) {
|
|
30909
30917
|
_this._expandedPanels.add(args.owner);
|
|
30918
|
+
_this._expandingPanels.delete(args.owner);
|
|
30910
30919
|
var evArgs = Object.assign(Object.assign({}, args), { owner: _this, panel: args.owner });
|
|
30911
30920
|
_this.panelExpanded.emit(evArgs);
|
|
30912
30921
|
});
|
|
@@ -30914,21 +30923,36 @@
|
|
|
30914
30923
|
if (args.cancel) {
|
|
30915
30924
|
return;
|
|
30916
30925
|
}
|
|
30926
|
+
var evArgs = Object.assign(Object.assign({}, args), { owner: _this, panel: args.owner });
|
|
30927
|
+
_this.panelExpanding.emit(evArgs);
|
|
30928
|
+
if (evArgs.cancel) {
|
|
30929
|
+
args.cancel = true;
|
|
30930
|
+
return;
|
|
30931
|
+
}
|
|
30917
30932
|
if (_this.singleBranchExpand) {
|
|
30918
30933
|
_this._expandedPanels.forEach(function (p) {
|
|
30919
30934
|
if (!p.header.disabled) {
|
|
30920
30935
|
p.collapse();
|
|
30921
30936
|
}
|
|
30922
30937
|
});
|
|
30923
|
-
|
|
30924
|
-
|
|
30925
|
-
|
|
30926
|
-
|
|
30927
|
-
|
|
30938
|
+
_this._expandingPanels.forEach(function (p) {
|
|
30939
|
+
var _a, _b;
|
|
30940
|
+
if (!p.header.disabled) {
|
|
30941
|
+
if (!p.animationSettings.closeAnimation) {
|
|
30942
|
+
(_a = p.openAnimationPlayer) === null || _a === void 0 ? void 0 : _a.reset();
|
|
30943
|
+
}
|
|
30944
|
+
if (!p.animationSettings.openAnimation) {
|
|
30945
|
+
(_b = p.closeAnimationPlayer) === null || _b === void 0 ? void 0 : _b.reset();
|
|
30946
|
+
}
|
|
30947
|
+
p.collapse();
|
|
30948
|
+
}
|
|
30949
|
+
});
|
|
30950
|
+
_this._expandingPanels.add(args.owner);
|
|
30928
30951
|
}
|
|
30929
30952
|
});
|
|
30930
30953
|
panel.contentCollapsed.pipe(operators.takeUntil(_this._unsubChildren$)).subscribe(function (args) {
|
|
30931
30954
|
_this._expandedPanels.delete(args.owner);
|
|
30955
|
+
_this._expandingPanels.delete(args.owner);
|
|
30932
30956
|
var evArgs = Object.assign(Object.assign({}, args), { owner: _this, panel: args.owner });
|
|
30933
30957
|
_this.panelCollapsed.emit(evArgs);
|
|
30934
30958
|
});
|
|
@@ -38834,10 +38858,10 @@
|
|
|
38834
38858
|
return;
|
|
38835
38859
|
}
|
|
38836
38860
|
if (!selected) {
|
|
38837
|
-
this.combo.
|
|
38861
|
+
this.combo.select([itemID], false, event);
|
|
38838
38862
|
}
|
|
38839
38863
|
else {
|
|
38840
|
-
this.combo.
|
|
38864
|
+
this.combo.deselect([itemID], event);
|
|
38841
38865
|
}
|
|
38842
38866
|
};
|
|
38843
38867
|
IgxComboAPIService.prototype.is_item_selected = function (itemID) {
|
|
@@ -38955,7 +38979,7 @@
|
|
|
38955
38979
|
IgxComboItemComponent.decorators = [
|
|
38956
38980
|
{ type: i0.Component, args: [{
|
|
38957
38981
|
selector: 'igx-combo-item',
|
|
38958
|
-
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"
|
|
38982
|
+
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"
|
|
38959
38983
|
},] }
|
|
38960
38984
|
];
|
|
38961
38985
|
IgxComboItemComponent.ctorParameters = function () { return [
|
|
@@ -38965,359 +38989,25 @@
|
|
|
38965
38989
|
{ type: IgxSelectionAPIService, decorators: [{ type: i0.Inject, args: [IgxSelectionAPIService,] }] }
|
|
38966
38990
|
]; };
|
|
38967
38991
|
IgxComboItemComponent.propDecorators = {
|
|
38968
|
-
itemHeight: [{ type: i0.Input }, { type: i0.HostBinding, args: ['style.height.px',] }]
|
|
38992
|
+
itemHeight: [{ type: i0.Input }, { type: i0.HostBinding, args: ['style.height.px',] }],
|
|
38993
|
+
singleMode: [{ type: i0.Input }]
|
|
38969
38994
|
};
|
|
38970
38995
|
|
|
38971
38996
|
var IGX_COMBO_COMPONENT = new i0.InjectionToken('IgxComboComponentToken');
|
|
38972
|
-
|
|
38997
|
+
var NEXT_ID$c = 0;
|
|
38973
38998
|
/**
|
|
38974
38999
|
* @hidden
|
|
39000
|
+
* The default number of items that should be in the combo's
|
|
39001
|
+
* drop-down list if no `[itemsMaxHeight]` is specified
|
|
38975
39002
|
*/
|
|
38976
|
-
var
|
|
38977
|
-
|
|
38978
|
-
|
|
38979
|
-
|
|
38980
|
-
|
|
38981
|
-
|
|
38982
|
-
get: function () {
|
|
38983
|
-
return false;
|
|
38984
|
-
},
|
|
38985
|
-
set: function (value) {
|
|
38986
|
-
},
|
|
38987
|
-
enumerable: false,
|
|
38988
|
-
configurable: true
|
|
38989
|
-
});
|
|
38990
|
-
/**
|
|
38991
|
-
* @inheritdoc
|
|
38992
|
-
*/
|
|
38993
|
-
IgxComboAddItemComponent.prototype.clicked = function (event) {
|
|
38994
|
-
this.comboAPI.disableTransitions = false;
|
|
38995
|
-
this.comboAPI.add_custom_item();
|
|
38996
|
-
};
|
|
38997
|
-
return IgxComboAddItemComponent;
|
|
38998
|
-
}(IgxComboItemComponent));
|
|
38999
|
-
IgxComboAddItemComponent.decorators = [
|
|
39000
|
-
{ type: i0.Component, args: [{
|
|
39001
|
-
selector: 'igx-combo-add-item',
|
|
39002
|
-
template: '<ng-content></ng-content>',
|
|
39003
|
-
providers: [{ provide: IgxComboItemComponent, useExisting: IgxComboAddItemComponent }]
|
|
39004
|
-
},] }
|
|
39005
|
-
];
|
|
39006
|
-
|
|
39007
|
-
/** @hidden */
|
|
39008
|
-
var IgxComboDropDownComponent = /** @class */ (function (_super) {
|
|
39009
|
-
__extends(IgxComboDropDownComponent, _super);
|
|
39010
|
-
function IgxComboDropDownComponent(elementRef, cdr, platform, selection, combo, comboAPI, _displayDensityOptions) {
|
|
39011
|
-
var _this = _super.call(this, elementRef, cdr, platform, selection, _displayDensityOptions) || this;
|
|
39012
|
-
_this.elementRef = elementRef;
|
|
39013
|
-
_this.cdr = cdr;
|
|
39014
|
-
_this.platform = platform;
|
|
39015
|
-
_this.selection = selection;
|
|
39016
|
-
_this.combo = combo;
|
|
39017
|
-
_this.comboAPI = comboAPI;
|
|
39018
|
-
_this._displayDensityOptions = _displayDensityOptions;
|
|
39019
|
-
/**
|
|
39020
|
-
* @hidden
|
|
39021
|
-
* @internal
|
|
39022
|
-
*/
|
|
39023
|
-
_this.children = null;
|
|
39024
|
-
_this.scrollHandler = function () {
|
|
39025
|
-
_this.comboAPI.disableTransitions = true;
|
|
39026
|
-
};
|
|
39027
|
-
return _this;
|
|
39028
|
-
}
|
|
39029
|
-
Object.defineProperty(IgxComboDropDownComponent.prototype, "scrollContainer", {
|
|
39030
|
-
/** @hidden @internal */
|
|
39031
|
-
get: function () {
|
|
39032
|
-
return this.virtDir.dc.location.nativeElement;
|
|
39033
|
-
},
|
|
39034
|
-
enumerable: false,
|
|
39035
|
-
configurable: true
|
|
39036
|
-
});
|
|
39037
|
-
Object.defineProperty(IgxComboDropDownComponent.prototype, "isScrolledToLast", {
|
|
39038
|
-
get: function () {
|
|
39039
|
-
var scrollTop = this.virtDir.scrollPosition;
|
|
39040
|
-
var scrollHeight = this.virtDir.getScroll().scrollHeight;
|
|
39041
|
-
return Math.floor(scrollTop + this.virtDir.igxForContainerSize) === scrollHeight;
|
|
39042
|
-
},
|
|
39043
|
-
enumerable: false,
|
|
39044
|
-
configurable: true
|
|
39045
|
-
});
|
|
39046
|
-
Object.defineProperty(IgxComboDropDownComponent.prototype, "lastVisibleIndex", {
|
|
39047
|
-
get: function () {
|
|
39048
|
-
return this.combo.totalItemCount ?
|
|
39049
|
-
Math.floor(this.combo.itemsMaxHeight / this.combo.itemHeight) :
|
|
39050
|
-
this.items.length - 1;
|
|
39051
|
-
},
|
|
39052
|
-
enumerable: false,
|
|
39053
|
-
configurable: true
|
|
39054
|
-
});
|
|
39055
|
-
Object.defineProperty(IgxComboDropDownComponent.prototype, "sortedChildren", {
|
|
39056
|
-
get: function () {
|
|
39057
|
-
if (this.children !== undefined) {
|
|
39058
|
-
return this.children.toArray()
|
|
39059
|
-
.sort(function (a, b) { return a.index - b.index; });
|
|
39060
|
-
}
|
|
39061
|
-
return null;
|
|
39062
|
-
},
|
|
39063
|
-
enumerable: false,
|
|
39064
|
-
configurable: true
|
|
39065
|
-
});
|
|
39066
|
-
Object.defineProperty(IgxComboDropDownComponent.prototype, "items", {
|
|
39067
|
-
/**
|
|
39068
|
-
* Get all non-header items
|
|
39069
|
-
*
|
|
39070
|
-
* ```typescript
|
|
39071
|
-
* let myDropDownItems = this.dropdown.items;
|
|
39072
|
-
* ```
|
|
39073
|
-
*/
|
|
39074
|
-
get: function () {
|
|
39075
|
-
var e_1, _a;
|
|
39076
|
-
var items = [];
|
|
39077
|
-
if (this.children !== undefined) {
|
|
39078
|
-
var sortedChildren = this.sortedChildren;
|
|
39079
|
-
try {
|
|
39080
|
-
for (var sortedChildren_1 = __values(sortedChildren), sortedChildren_1_1 = sortedChildren_1.next(); !sortedChildren_1_1.done; sortedChildren_1_1 = sortedChildren_1.next()) {
|
|
39081
|
-
var child = sortedChildren_1_1.value;
|
|
39082
|
-
if (!child.isHeader) {
|
|
39083
|
-
items.push(child);
|
|
39084
|
-
}
|
|
39085
|
-
}
|
|
39086
|
-
}
|
|
39087
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
39088
|
-
finally {
|
|
39089
|
-
try {
|
|
39090
|
-
if (sortedChildren_1_1 && !sortedChildren_1_1.done && (_a = sortedChildren_1.return)) _a.call(sortedChildren_1);
|
|
39091
|
-
}
|
|
39092
|
-
finally { if (e_1) throw e_1.error; }
|
|
39093
|
-
}
|
|
39094
|
-
}
|
|
39095
|
-
return items;
|
|
39096
|
-
},
|
|
39097
|
-
enumerable: false,
|
|
39098
|
-
configurable: true
|
|
39099
|
-
});
|
|
39100
|
-
/**
|
|
39101
|
-
* @hidden @internal
|
|
39102
|
-
*/
|
|
39103
|
-
IgxComboDropDownComponent.prototype.onFocus = function () {
|
|
39104
|
-
this.focusedItem = this._focusedItem || this.items[0];
|
|
39105
|
-
};
|
|
39106
|
-
/**
|
|
39107
|
-
* @hidden @internal
|
|
39108
|
-
*/
|
|
39109
|
-
IgxComboDropDownComponent.prototype.onBlur = function (_evt) {
|
|
39110
|
-
this.focusedItem = null;
|
|
39111
|
-
};
|
|
39112
|
-
/**
|
|
39113
|
-
* @hidden @internal
|
|
39114
|
-
*/
|
|
39115
|
-
IgxComboDropDownComponent.prototype.onToggleOpened = function () {
|
|
39116
|
-
this.opened.emit();
|
|
39117
|
-
};
|
|
39118
|
-
/**
|
|
39119
|
-
* @hidden
|
|
39120
|
-
*/
|
|
39121
|
-
IgxComboDropDownComponent.prototype.navigateFirst = function () {
|
|
39122
|
-
this.navigateItem(this.virtDir.igxForOf.findIndex(function (e) { return !e.isHeader; }));
|
|
39123
|
-
};
|
|
39124
|
-
/**
|
|
39125
|
-
* @hidden
|
|
39126
|
-
*/
|
|
39127
|
-
IgxComboDropDownComponent.prototype.navigatePrev = function () {
|
|
39128
|
-
if (this._focusedItem && this._focusedItem.index === 0 && this.virtDir.state.startIndex === 0) {
|
|
39129
|
-
this.combo.focusSearchInput(false);
|
|
39130
|
-
}
|
|
39131
|
-
else {
|
|
39132
|
-
_super.prototype.navigatePrev.call(this);
|
|
39133
|
-
}
|
|
39134
|
-
};
|
|
39135
|
-
/**
|
|
39136
|
-
* @hidden
|
|
39137
|
-
*/
|
|
39138
|
-
IgxComboDropDownComponent.prototype.navigateNext = function () {
|
|
39139
|
-
var lastIndex = this.combo.totalItemCount ? this.combo.totalItemCount - 1 : this.virtDir.igxForOf.length - 1;
|
|
39140
|
-
if (this._focusedItem && this._focusedItem.index === lastIndex) {
|
|
39141
|
-
this.focusAddItemButton();
|
|
39142
|
-
}
|
|
39143
|
-
else {
|
|
39144
|
-
_super.prototype.navigateNext.call(this);
|
|
39145
|
-
}
|
|
39146
|
-
};
|
|
39147
|
-
/**
|
|
39148
|
-
* @hidden @internal
|
|
39149
|
-
*/
|
|
39150
|
-
IgxComboDropDownComponent.prototype.selectItem = function (item) {
|
|
39151
|
-
if (item === null || item === undefined) {
|
|
39152
|
-
return;
|
|
39153
|
-
}
|
|
39154
|
-
this.comboAPI.set_selected_item(item.itemID);
|
|
39155
|
-
this._focusedItem = item;
|
|
39156
|
-
};
|
|
39157
|
-
/**
|
|
39158
|
-
* @hidden @internal
|
|
39159
|
-
*/
|
|
39160
|
-
IgxComboDropDownComponent.prototype.updateScrollPosition = function () {
|
|
39161
|
-
this.virtDir.getScroll().scrollTop = this._scrollPosition;
|
|
39162
|
-
};
|
|
39163
|
-
/**
|
|
39164
|
-
* @hidden @internal
|
|
39165
|
-
*/
|
|
39166
|
-
IgxComboDropDownComponent.prototype.onItemActionKey = function (key) {
|
|
39167
|
-
switch (key) {
|
|
39168
|
-
case DropDownActionKey.ENTER:
|
|
39169
|
-
this.handleEnter();
|
|
39170
|
-
break;
|
|
39171
|
-
case DropDownActionKey.SPACE:
|
|
39172
|
-
this.handleSpace();
|
|
39173
|
-
break;
|
|
39174
|
-
case DropDownActionKey.ESCAPE:
|
|
39175
|
-
this.close();
|
|
39176
|
-
}
|
|
39177
|
-
};
|
|
39178
|
-
IgxComboDropDownComponent.prototype.ngAfterViewInit = function () {
|
|
39179
|
-
this.virtDir.getScroll().addEventListener('scroll', this.scrollHandler);
|
|
39180
|
-
};
|
|
39181
|
-
/**
|
|
39182
|
-
* @hidden @internal
|
|
39183
|
-
*/
|
|
39184
|
-
IgxComboDropDownComponent.prototype.ngOnDestroy = function () {
|
|
39185
|
-
this.virtDir.getScroll().removeEventListener('scroll', this.scrollHandler);
|
|
39186
|
-
this.destroy$.next(true);
|
|
39187
|
-
this.destroy$.complete();
|
|
39188
|
-
};
|
|
39189
|
-
IgxComboDropDownComponent.prototype.scrollToHiddenItem = function (_newItem) { };
|
|
39190
|
-
IgxComboDropDownComponent.prototype.handleEnter = function () {
|
|
39191
|
-
if (this.isAddItemFocused()) {
|
|
39192
|
-
this.combo.addItemToCollection();
|
|
39193
|
-
}
|
|
39194
|
-
else {
|
|
39195
|
-
this.close();
|
|
39196
|
-
}
|
|
39197
|
-
};
|
|
39198
|
-
IgxComboDropDownComponent.prototype.handleSpace = function () {
|
|
39199
|
-
if (this.isAddItemFocused()) {
|
|
39200
|
-
return;
|
|
39201
|
-
}
|
|
39202
|
-
else {
|
|
39203
|
-
this.selectItem(this.focusedItem);
|
|
39204
|
-
}
|
|
39205
|
-
};
|
|
39206
|
-
IgxComboDropDownComponent.prototype.isAddItemFocused = function () {
|
|
39207
|
-
return this.focusedItem instanceof IgxComboAddItemComponent;
|
|
39208
|
-
};
|
|
39209
|
-
IgxComboDropDownComponent.prototype.focusAddItemButton = function () {
|
|
39210
|
-
if (this.combo.isAddButtonVisible()) {
|
|
39211
|
-
this.focusedItem = this.items[this.items.length - 1];
|
|
39212
|
-
}
|
|
39213
|
-
};
|
|
39214
|
-
return IgxComboDropDownComponent;
|
|
39215
|
-
}(IgxDropDownComponent));
|
|
39216
|
-
IgxComboDropDownComponent.decorators = [
|
|
39217
|
-
{ type: i0.Component, args: [{
|
|
39218
|
-
selector: 'igx-combo-drop-down',
|
|
39219
|
-
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",
|
|
39220
|
-
providers: [{ provide: IGX_DROPDOWN_BASE, useExisting: IgxComboDropDownComponent }]
|
|
39221
|
-
},] }
|
|
39222
|
-
];
|
|
39223
|
-
IgxComboDropDownComponent.ctorParameters = function () { return [
|
|
39224
|
-
{ type: i0.ElementRef },
|
|
39225
|
-
{ type: i0.ChangeDetectorRef },
|
|
39226
|
-
{ type: PlatformUtil },
|
|
39227
|
-
{ type: IgxSelectionAPIService },
|
|
39228
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [IGX_COMBO_COMPONENT,] }] },
|
|
39229
|
-
{ type: IgxComboAPIService },
|
|
39230
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [DisplayDensityToken,] }] }
|
|
39231
|
-
]; };
|
|
39232
|
-
IgxComboDropDownComponent.propDecorators = {
|
|
39233
|
-
children: [{ type: i0.ContentChildren, args: [IgxComboItemComponent, { descendants: true },] }]
|
|
39003
|
+
var itemsInContainer = 10; // TODO: make private readonly
|
|
39004
|
+
/** @hidden @internal */
|
|
39005
|
+
var ItemHeights = {
|
|
39006
|
+
comfortable: 40,
|
|
39007
|
+
cosy: 32,
|
|
39008
|
+
compact: 28,
|
|
39234
39009
|
};
|
|
39235
|
-
|
|
39236
|
-
/**
|
|
39237
|
-
* @hidden
|
|
39238
|
-
*/
|
|
39239
|
-
var IgxComboFilteringPipe = /** @class */ (function () {
|
|
39240
|
-
function IgxComboFilteringPipe() {
|
|
39241
|
-
}
|
|
39242
|
-
IgxComboFilteringPipe.prototype.transform = function (collection, searchValue, displayKey, shouldFilter, filteringOptions) {
|
|
39243
|
-
if (!collection) {
|
|
39244
|
-
return [];
|
|
39245
|
-
}
|
|
39246
|
-
if (!searchValue || !shouldFilter) {
|
|
39247
|
-
return collection;
|
|
39248
|
-
}
|
|
39249
|
-
else {
|
|
39250
|
-
var searchTerm_1 = filteringOptions.caseSensitive ? searchValue.trim() : searchValue.toLowerCase().trim();
|
|
39251
|
-
if (displayKey != null) {
|
|
39252
|
-
return collection.filter(function (e) { return filteringOptions.caseSensitive ? e[displayKey].includes(searchTerm_1) :
|
|
39253
|
-
e[displayKey].toString().toLowerCase().includes(searchTerm_1); });
|
|
39254
|
-
}
|
|
39255
|
-
else {
|
|
39256
|
-
return collection.filter(function (e) { return filteringOptions.caseSensitive ? e.includes(searchTerm_1) :
|
|
39257
|
-
e.toLowerCase().includes(searchTerm_1); });
|
|
39258
|
-
}
|
|
39259
|
-
}
|
|
39260
|
-
};
|
|
39261
|
-
return IgxComboFilteringPipe;
|
|
39262
|
-
}());
|
|
39263
|
-
IgxComboFilteringPipe.decorators = [
|
|
39264
|
-
{ type: i0.Pipe, args: [{
|
|
39265
|
-
name: 'comboFiltering'
|
|
39266
|
-
},] }
|
|
39267
|
-
];
|
|
39268
|
-
/**
|
|
39269
|
-
* @hidden
|
|
39270
|
-
*/
|
|
39271
|
-
var IgxComboGroupingPipe = /** @class */ (function () {
|
|
39272
|
-
function IgxComboGroupingPipe(combo) {
|
|
39273
|
-
this.combo = combo;
|
|
39274
|
-
}
|
|
39275
|
-
IgxComboGroupingPipe.prototype.transform = function (collection, groupKey, valueKey) {
|
|
39276
|
-
var _a;
|
|
39277
|
-
this.combo.filteredData = collection;
|
|
39278
|
-
if ((!groupKey && groupKey !== 0) || !collection.length) {
|
|
39279
|
-
return collection;
|
|
39280
|
-
}
|
|
39281
|
-
var sorted = DataUtil.sort(cloneArray(collection), [{
|
|
39282
|
-
fieldName: groupKey,
|
|
39283
|
-
dir: exports.SortingDirection.Asc,
|
|
39284
|
-
ignoreCase: true,
|
|
39285
|
-
strategy: DefaultSortingStrategy.instance()
|
|
39286
|
-
}]);
|
|
39287
|
-
var data = cloneArray(sorted);
|
|
39288
|
-
var inserts = 0;
|
|
39289
|
-
var currentHeader = null;
|
|
39290
|
-
for (var i = 0; i < sorted.length; i++) {
|
|
39291
|
-
var insertFlag = 0;
|
|
39292
|
-
if (currentHeader !== sorted[i][groupKey]) {
|
|
39293
|
-
currentHeader = sorted[i][groupKey];
|
|
39294
|
-
insertFlag = 1;
|
|
39295
|
-
}
|
|
39296
|
-
if (insertFlag) {
|
|
39297
|
-
data.splice(i + inserts, 0, (_a = {},
|
|
39298
|
-
_a[valueKey] = currentHeader,
|
|
39299
|
-
_a[groupKey] = currentHeader,
|
|
39300
|
-
_a.isHeader = true,
|
|
39301
|
-
_a));
|
|
39302
|
-
inserts++;
|
|
39303
|
-
}
|
|
39304
|
-
}
|
|
39305
|
-
return data;
|
|
39306
|
-
};
|
|
39307
|
-
return IgxComboGroupingPipe;
|
|
39308
|
-
}());
|
|
39309
|
-
IgxComboGroupingPipe.decorators = [
|
|
39310
|
-
{ type: i0.Pipe, args: [{
|
|
39311
|
-
name: 'comboGrouping'
|
|
39312
|
-
},] }
|
|
39313
|
-
];
|
|
39314
|
-
IgxComboGroupingPipe.ctorParameters = function () { return [
|
|
39315
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [IGX_COMBO_COMPONENT,] }] }
|
|
39316
|
-
]; };
|
|
39317
|
-
|
|
39318
|
-
/**
|
|
39319
|
-
* @hidden
|
|
39320
|
-
*/
|
|
39010
|
+
/** @hidden @internal */
|
|
39321
39011
|
var DataTypes;
|
|
39322
39012
|
(function (DataTypes) {
|
|
39323
39013
|
DataTypes["EMPTY"] = "empty";
|
|
@@ -39325,21 +39015,7 @@
|
|
|
39325
39015
|
DataTypes["COMPLEX"] = "complex";
|
|
39326
39016
|
DataTypes["PRIMARYKEY"] = "valueKey";
|
|
39327
39017
|
})(DataTypes || (DataTypes = {}));
|
|
39328
|
-
|
|
39329
|
-
* @hidden
|
|
39330
|
-
*/
|
|
39331
|
-
var ItemHeights = {
|
|
39332
|
-
comfortable: 40,
|
|
39333
|
-
cosy: 32,
|
|
39334
|
-
compact: 28,
|
|
39335
|
-
};
|
|
39336
|
-
/**
|
|
39337
|
-
* @hidden
|
|
39338
|
-
* The default number of items that should be in the combo's
|
|
39339
|
-
* drop-down list if no `[itemsMaxHeight]` is specified
|
|
39340
|
-
*/
|
|
39341
|
-
var itemsInContainer = 10;
|
|
39342
|
-
exports.IgxComboState = void 0;
|
|
39018
|
+
var IgxComboState;
|
|
39343
39019
|
(function (IgxComboState) {
|
|
39344
39020
|
/**
|
|
39345
39021
|
* Combo with initial state.
|
|
@@ -39353,54 +39029,33 @@
|
|
|
39353
39029
|
* Combo with invalid state.
|
|
39354
39030
|
*/
|
|
39355
39031
|
IgxComboState[IgxComboState["INVALID"] = 2] = "INVALID";
|
|
39356
|
-
})(
|
|
39357
|
-
/**
|
|
39358
|
-
|
|
39359
|
-
|
|
39360
|
-
* @hidden
|
|
39361
|
-
*/
|
|
39362
|
-
var diffInSets = function (set1, set2) {
|
|
39363
|
-
var results = [];
|
|
39364
|
-
set1.forEach(function (entry) {
|
|
39365
|
-
if (!set2.has(entry)) {
|
|
39366
|
-
results.push(entry);
|
|
39367
|
-
}
|
|
39368
|
-
});
|
|
39369
|
-
return results;
|
|
39370
|
-
};
|
|
39371
|
-
var ɵ0$1 = diffInSets;
|
|
39372
|
-
var NEXT_ID$c = 0;
|
|
39373
|
-
/**
|
|
39374
|
-
* Represents a drop-down list that provides editable functionalities, allowing users to choose an option from a predefined list.
|
|
39375
|
-
*
|
|
39376
|
-
* @igxModule IgxComboModule
|
|
39377
|
-
* @igxTheme igx-combo-theme
|
|
39378
|
-
* @igxKeywords combobox, combo selection
|
|
39379
|
-
* @igxGroup Grids & Lists
|
|
39380
|
-
*
|
|
39381
|
-
* @remarks
|
|
39382
|
-
* It provides the ability to filter items as well as perform single or multiple seleciton with the provided data.
|
|
39383
|
-
* Additionally, it exposes keyboard navigation and custom styling capabilities.
|
|
39384
|
-
* @example
|
|
39385
|
-
* ```html
|
|
39386
|
-
* <igx-combo [itemsMaxHeight]="250" [data]="locationData"
|
|
39387
|
-
* [displayKey]="'field'" [valueKey]="'field'"
|
|
39388
|
-
* placeholder="Location(s)" searchPlaceholder="Search...">
|
|
39389
|
-
* </igx-combo>
|
|
39390
|
-
* ```
|
|
39391
|
-
*/
|
|
39392
|
-
var IgxComboComponent = /** @class */ (function (_super) {
|
|
39393
|
-
__extends(IgxComboComponent, _super);
|
|
39394
|
-
function IgxComboComponent(elementRef, cdr, selection, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector) {
|
|
39032
|
+
})(IgxComboState || (IgxComboState = {}));
|
|
39033
|
+
var IgxComboBaseDirective = /** @class */ (function (_super) {
|
|
39034
|
+
__extends(IgxComboBaseDirective, _super);
|
|
39035
|
+
function IgxComboBaseDirective(elementRef, cdr, selectionService, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector) {
|
|
39395
39036
|
var _this = _super.call(this, _displayDensityOptions) || this;
|
|
39396
39037
|
_this.elementRef = elementRef;
|
|
39397
39038
|
_this.cdr = cdr;
|
|
39398
|
-
_this.
|
|
39039
|
+
_this.selectionService = selectionService;
|
|
39399
39040
|
_this.comboAPI = comboAPI;
|
|
39400
39041
|
_this._iconService = _iconService;
|
|
39401
39042
|
_this._displayDensityOptions = _displayDensityOptions;
|
|
39402
39043
|
_this._inputGroupType = _inputGroupType;
|
|
39403
39044
|
_this._injector = _injector;
|
|
39045
|
+
/**
|
|
39046
|
+
* Defines whether the caseSensitive icon should be shown in the search input
|
|
39047
|
+
*
|
|
39048
|
+
* ```typescript
|
|
39049
|
+
* // get
|
|
39050
|
+
* let myComboShowSearchCaseIcon = this.combo.showSearchCaseIcon;
|
|
39051
|
+
* ```
|
|
39052
|
+
*
|
|
39053
|
+
* ```html
|
|
39054
|
+
* <!--set-->
|
|
39055
|
+
* <igx-combo [showSearchCaseIcon]='true'></igx-combo>
|
|
39056
|
+
* ```
|
|
39057
|
+
*/
|
|
39058
|
+
_this.showSearchCaseIcon = false;
|
|
39404
39059
|
/**
|
|
39405
39060
|
* Set custom overlay settings that control how the combo's list of items is displayed.
|
|
39406
39061
|
* Set:
|
|
@@ -39419,180 +39074,65 @@
|
|
|
39419
39074
|
*/
|
|
39420
39075
|
_this.overlaySettings = null;
|
|
39421
39076
|
/**
|
|
39422
|
-
*
|
|
39423
|
-
*/
|
|
39424
|
-
_this.searchInput = null;
|
|
39425
|
-
/**
|
|
39426
|
-
* The custom template, if any, that should be used when rendering ITEMS in the combo list
|
|
39077
|
+
* Gets/gets combo id.
|
|
39427
39078
|
*
|
|
39428
39079
|
* ```typescript
|
|
39429
|
-
* //
|
|
39430
|
-
*
|
|
39431
|
-
* myComponent.combo.itemTemplate = myCustomTemplate;
|
|
39080
|
+
* // get
|
|
39081
|
+
* let id = this.combo.id;
|
|
39432
39082
|
* ```
|
|
39083
|
+
*
|
|
39433
39084
|
* ```html
|
|
39434
|
-
* <!--
|
|
39435
|
-
*
|
|
39436
|
-
* ...
|
|
39437
|
-
* <ng-template igxComboItem>
|
|
39438
|
-
* <div class="custom-item" let-item let-key="valueKey">
|
|
39439
|
-
* <div class="custom-item__name">{{ item[key] }}</div>
|
|
39440
|
-
* <div class="custom-item__cost">{{ item.cost }}</div>
|
|
39441
|
-
* </div>
|
|
39442
|
-
* </ng-template>
|
|
39443
|
-
* </igx-combo>
|
|
39085
|
+
* <!--set-->
|
|
39086
|
+
* <igx-combo [id]='combo1'></igx-combo>
|
|
39444
39087
|
* ```
|
|
39445
39088
|
*/
|
|
39446
|
-
_this.
|
|
39089
|
+
_this.id = "igx-combo-" + NEXT_ID$c++;
|
|
39447
39090
|
/**
|
|
39448
|
-
*
|
|
39091
|
+
* Controls whether custom values can be added to the collection
|
|
39449
39092
|
*
|
|
39450
39093
|
* ```typescript
|
|
39451
|
-
* //
|
|
39452
|
-
*
|
|
39453
|
-
* myComponent.combo.headerTemplate = myCustomTemplate;
|
|
39094
|
+
* // get
|
|
39095
|
+
* let comboAllowsCustomValues = this.combo.allowCustomValues;
|
|
39454
39096
|
* ```
|
|
39097
|
+
*
|
|
39455
39098
|
* ```html
|
|
39456
|
-
* <!--
|
|
39457
|
-
*
|
|
39458
|
-
* ...
|
|
39459
|
-
* <ng-template igxComboHeader>
|
|
39460
|
-
* <div class="combo__header">
|
|
39461
|
-
* This is a custom header
|
|
39462
|
-
* </div>
|
|
39463
|
-
* </ng-template>
|
|
39464
|
-
* </igx-combo>
|
|
39099
|
+
* <!--set-->
|
|
39100
|
+
* <igx-combo [allowCustomValues]='true'></igx-combo>
|
|
39465
39101
|
* ```
|
|
39466
39102
|
*/
|
|
39467
|
-
_this.
|
|
39103
|
+
_this.allowCustomValues = false;
|
|
39468
39104
|
/**
|
|
39469
|
-
*
|
|
39105
|
+
* Determines which column in the data source is used to determine the value.
|
|
39470
39106
|
*
|
|
39471
39107
|
* ```typescript
|
|
39472
|
-
* //
|
|
39473
|
-
*
|
|
39474
|
-
* myComponent.combo.footerTemplate = myCustomTemplate;
|
|
39108
|
+
* // get
|
|
39109
|
+
* let myComboValueKey = this.combo.valueKey;
|
|
39475
39110
|
* ```
|
|
39111
|
+
*
|
|
39476
39112
|
* ```html
|
|
39477
|
-
* <!--
|
|
39478
|
-
*
|
|
39479
|
-
* ...
|
|
39480
|
-
* <ng-template igxComboFooter>
|
|
39481
|
-
* <div class="combo__footer">
|
|
39482
|
-
* This is a custom footer
|
|
39483
|
-
* </div>
|
|
39484
|
-
* </ng-template>
|
|
39485
|
-
* </igx-combo>
|
|
39113
|
+
* <!--set-->
|
|
39114
|
+
* <igx-combo [valueKey]='myKey'></igx-combo>
|
|
39486
39115
|
* ```
|
|
39487
39116
|
*/
|
|
39488
|
-
_this.
|
|
39117
|
+
_this.valueKey = null;
|
|
39489
39118
|
/**
|
|
39490
|
-
*
|
|
39491
|
-
*
|
|
39492
|
-
* ```typescript
|
|
39493
|
-
* // Set in typescript
|
|
39494
|
-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39495
|
-
* myComponent.combo.headerItemTemplate = myCustomTemplate;
|
|
39496
|
-
* ```
|
|
39119
|
+
* An @Input property that enabled/disables filtering in the list. The default is `true`.
|
|
39497
39120
|
* ```html
|
|
39498
|
-
*
|
|
39499
|
-
* <igx-combo #combo>
|
|
39500
|
-
* ...
|
|
39501
|
-
* <ng-template igxComboHeaderItem let-item let-key="groupKey">
|
|
39502
|
-
* <div class="custom-item--group">Group header for {{ item[key] }}</div>
|
|
39503
|
-
* </ng-template>
|
|
39504
|
-
* </igx-combo>
|
|
39505
|
-
* ```
|
|
39506
|
-
*/
|
|
39507
|
-
_this.headerItemTemplate = null;
|
|
39508
|
-
/**
|
|
39509
|
-
* The custom template, if any, that should be used when rendering the ADD BUTTON in the combo drop down
|
|
39510
|
-
*
|
|
39511
|
-
* ```typescript
|
|
39512
|
-
* // Set in typescript
|
|
39513
|
-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39514
|
-
* myComponent.combo.addItemTemplate = myCustomTemplate;
|
|
39515
|
-
* ```
|
|
39516
|
-
* ```html
|
|
39517
|
-
* <!-- Set in markup -->
|
|
39518
|
-
* <igx-combo #combo>
|
|
39519
|
-
* ...
|
|
39520
|
-
* <ng-template igxComboAddItem>
|
|
39521
|
-
* <button class="combo__add-button">
|
|
39522
|
-
* Click to add item
|
|
39523
|
-
* </button>
|
|
39524
|
-
* </ng-template>
|
|
39525
|
-
* </igx-combo>
|
|
39526
|
-
* ```
|
|
39527
|
-
*/
|
|
39528
|
-
_this.addItemTemplate = null;
|
|
39529
|
-
/**
|
|
39530
|
-
* The custom template, if any, that should be used when rendering the ADD BUTTON in the combo drop down
|
|
39531
|
-
*
|
|
39532
|
-
* ```typescript
|
|
39533
|
-
* // Set in typescript
|
|
39534
|
-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39535
|
-
* myComponent.combo.emptyTemplate = myCustomTemplate;
|
|
39536
|
-
* ```
|
|
39537
|
-
* ```html
|
|
39538
|
-
* <!-- Set in markup -->
|
|
39539
|
-
* <igx-combo #combo>
|
|
39540
|
-
* ...
|
|
39541
|
-
* <ng-template igxComboEmpty>
|
|
39542
|
-
* <div class="combo--empty">
|
|
39543
|
-
* There are no items to display
|
|
39544
|
-
* </div>
|
|
39545
|
-
* </ng-template>
|
|
39546
|
-
* </igx-combo>
|
|
39547
|
-
* ```
|
|
39548
|
-
*/
|
|
39549
|
-
_this.emptyTemplate = null;
|
|
39550
|
-
/**
|
|
39551
|
-
* The custom template, if any, that should be used when rendering the combo TOGGLE(open/close) button
|
|
39552
|
-
*
|
|
39553
|
-
* ```typescript
|
|
39554
|
-
* // Set in typescript
|
|
39555
|
-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39556
|
-
* myComponent.combo.toggleIconTemplate = myCustomTemplate;
|
|
39557
|
-
* ```
|
|
39558
|
-
* ```html
|
|
39559
|
-
* <!-- Set in markup -->
|
|
39560
|
-
* <igx-combo #combo>
|
|
39561
|
-
* ...
|
|
39562
|
-
* <ng-template igxComboToggleIcon let-collapsed>
|
|
39563
|
-
* <igx-icon>{{ collapsed ? 'remove_circle' : 'remove_circle_outline'}}</igx-icon>
|
|
39564
|
-
* </ng-template>
|
|
39565
|
-
* </igx-combo>
|
|
39566
|
-
* ```
|
|
39567
|
-
*/
|
|
39568
|
-
_this.toggleIconTemplate = null;
|
|
39569
|
-
/**
|
|
39570
|
-
* The custom template, if any, that should be used when rendering the combo CLEAR button
|
|
39571
|
-
*
|
|
39572
|
-
* ```typescript
|
|
39573
|
-
* // Set in typescript
|
|
39574
|
-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39575
|
-
* myComponent.combo.clearIconTemplate = myCustomTemplate;
|
|
39576
|
-
* ```
|
|
39577
|
-
* ```html
|
|
39578
|
-
* <!-- Set in markup -->
|
|
39579
|
-
* <igx-combo #combo>
|
|
39580
|
-
* ...
|
|
39581
|
-
* <ng-template igxComboClearIcon>
|
|
39582
|
-
* <igx-icon>clear</igx-icon>
|
|
39583
|
-
* </ng-template>
|
|
39584
|
-
* </igx-combo>
|
|
39121
|
+
* <igx-combo [filterable]="false">
|
|
39585
39122
|
* ```
|
|
39586
39123
|
*/
|
|
39587
|
-
_this.
|
|
39124
|
+
_this.filterable = true;
|
|
39125
|
+
/** @hidden @internal */
|
|
39126
|
+
_this.cssClass = 'igx-combo'; // Independent of display density for the time being
|
|
39127
|
+
/** @hidden @internal */
|
|
39128
|
+
_this.role = 'combobox';
|
|
39588
39129
|
/**
|
|
39589
|
-
*
|
|
39590
|
-
*
|
|
39130
|
+
* An @Input property that enabled/disables combo. The default is `false`.
|
|
39591
39131
|
* ```html
|
|
39592
|
-
* <igx-combo
|
|
39132
|
+
* <igx-combo [disabled]="'true'">
|
|
39593
39133
|
* ```
|
|
39594
39134
|
*/
|
|
39595
|
-
_this.
|
|
39135
|
+
_this.disabled = false;
|
|
39596
39136
|
/**
|
|
39597
39137
|
* Emitted before the dropdown is opened
|
|
39598
39138
|
*
|
|
@@ -39650,202 +39190,219 @@
|
|
|
39650
39190
|
*/
|
|
39651
39191
|
_this.dataPreLoad = new i0.EventEmitter();
|
|
39652
39192
|
/**
|
|
39653
|
-
*
|
|
39193
|
+
* The custom template, if any, that should be used when rendering ITEMS in the combo list
|
|
39654
39194
|
*
|
|
39655
39195
|
* ```typescript
|
|
39656
|
-
* //
|
|
39657
|
-
*
|
|
39196
|
+
* // Set in typescript
|
|
39197
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39198
|
+
* myComponent.combo.itemTemplate = myCustomTemplate;
|
|
39658
39199
|
* ```
|
|
39659
|
-
*
|
|
39660
39200
|
* ```html
|
|
39661
|
-
* <!--
|
|
39662
|
-
*
|
|
39201
|
+
* <!-- Set in markup -->
|
|
39202
|
+
* <igx-combo #combo>
|
|
39203
|
+
* ...
|
|
39204
|
+
* <ng-template igxComboItem>
|
|
39205
|
+
* <div class="custom-item" let-item let-key="valueKey">
|
|
39206
|
+
* <div class="custom-item__name">{{ item[key] }}</div>
|
|
39207
|
+
* <div class="custom-item__cost">{{ item.cost }}</div>
|
|
39208
|
+
* </div>
|
|
39209
|
+
* </ng-template>
|
|
39210
|
+
* </igx-combo>
|
|
39663
39211
|
* ```
|
|
39664
39212
|
*/
|
|
39665
|
-
_this.
|
|
39666
|
-
/**
|
|
39667
|
-
* @hidden @internal
|
|
39668
|
-
*/
|
|
39669
|
-
_this.cssClass = 'igx-combo'; // Independent of display density, at the time being
|
|
39670
|
-
/**
|
|
39671
|
-
* @hidden @internal
|
|
39672
|
-
*/
|
|
39673
|
-
_this.role = 'combobox';
|
|
39213
|
+
_this.itemTemplate = null;
|
|
39674
39214
|
/**
|
|
39675
|
-
*
|
|
39215
|
+
* The custom template, if any, that should be used when rendering the HEADER for the combo items list
|
|
39676
39216
|
*
|
|
39677
39217
|
* ```typescript
|
|
39678
|
-
* //
|
|
39679
|
-
*
|
|
39218
|
+
* // Set in typescript
|
|
39219
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39220
|
+
* myComponent.combo.headerTemplate = myCustomTemplate;
|
|
39680
39221
|
* ```
|
|
39681
|
-
*
|
|
39682
39222
|
* ```html
|
|
39683
|
-
* <!--
|
|
39684
|
-
*
|
|
39223
|
+
* <!-- Set in markup -->
|
|
39224
|
+
* <igx-combo #combo>
|
|
39225
|
+
* ...
|
|
39226
|
+
* <ng-template igxComboHeader>
|
|
39227
|
+
* <div class="combo__header">
|
|
39228
|
+
* This is a custom header
|
|
39229
|
+
* </div>
|
|
39230
|
+
* </ng-template>
|
|
39231
|
+
* </igx-combo>
|
|
39685
39232
|
* ```
|
|
39686
39233
|
*/
|
|
39687
|
-
_this.
|
|
39234
|
+
_this.headerTemplate = null;
|
|
39688
39235
|
/**
|
|
39689
|
-
*
|
|
39236
|
+
* The custom template, if any, that should be used when rendering the FOOTER for the combo items list
|
|
39690
39237
|
*
|
|
39691
39238
|
* ```typescript
|
|
39692
|
-
* //
|
|
39693
|
-
*
|
|
39239
|
+
* // Set in typescript
|
|
39240
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39241
|
+
* myComponent.combo.footerTemplate = myCustomTemplate;
|
|
39694
39242
|
* ```
|
|
39695
|
-
*
|
|
39696
39243
|
* ```html
|
|
39697
|
-
* <!--
|
|
39698
|
-
*
|
|
39244
|
+
* <!-- Set in markup -->
|
|
39245
|
+
* <igx-combo #combo>
|
|
39246
|
+
* ...
|
|
39247
|
+
* <ng-template igxComboFooter>
|
|
39248
|
+
* <div class="combo__footer">
|
|
39249
|
+
* This is a custom footer
|
|
39250
|
+
* </div>
|
|
39251
|
+
* </ng-template>
|
|
39252
|
+
* </igx-combo>
|
|
39699
39253
|
* ```
|
|
39700
39254
|
*/
|
|
39701
|
-
_this.
|
|
39255
|
+
_this.footerTemplate = null;
|
|
39702
39256
|
/**
|
|
39703
|
-
*
|
|
39257
|
+
* The custom template, if any, that should be used when rendering HEADER ITEMS for groups in the combo list
|
|
39704
39258
|
*
|
|
39705
39259
|
* ```typescript
|
|
39706
|
-
* //
|
|
39707
|
-
*
|
|
39260
|
+
* // Set in typescript
|
|
39261
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39262
|
+
* myComponent.combo.headerItemTemplate = myCustomTemplate;
|
|
39708
39263
|
* ```
|
|
39709
|
-
*
|
|
39710
39264
|
* ```html
|
|
39711
|
-
* <!--
|
|
39712
|
-
*
|
|
39265
|
+
* <!-- Set in markup -->
|
|
39266
|
+
* <igx-combo #combo>
|
|
39267
|
+
* ...
|
|
39268
|
+
* <ng-template igxComboHeaderItem let-item let-key="groupKey">
|
|
39269
|
+
* <div class="custom-item--group">Group header for {{ item[key] }}</div>
|
|
39270
|
+
* </ng-template>
|
|
39271
|
+
* </igx-combo>
|
|
39713
39272
|
* ```
|
|
39714
39273
|
*/
|
|
39715
|
-
_this.
|
|
39274
|
+
_this.headerItemTemplate = null;
|
|
39716
39275
|
/**
|
|
39717
|
-
*
|
|
39276
|
+
* The custom template, if any, that should be used when rendering the ADD BUTTON in the combo drop down
|
|
39718
39277
|
*
|
|
39719
39278
|
* ```typescript
|
|
39720
|
-
* //
|
|
39721
|
-
*
|
|
39279
|
+
* // Set in typescript
|
|
39280
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39281
|
+
* myComponent.combo.addItemTemplate = myCustomTemplate;
|
|
39722
39282
|
* ```
|
|
39723
|
-
*
|
|
39724
39283
|
* ```html
|
|
39725
|
-
* <!--
|
|
39726
|
-
*
|
|
39284
|
+
* <!-- Set in markup -->
|
|
39285
|
+
* <igx-combo #combo>
|
|
39286
|
+
* ...
|
|
39287
|
+
* <ng-template igxComboAddItem>
|
|
39288
|
+
* <button class="combo__add-button">
|
|
39289
|
+
* Click to add item
|
|
39290
|
+
* </button>
|
|
39291
|
+
* </ng-template>
|
|
39292
|
+
* </igx-combo>
|
|
39727
39293
|
* ```
|
|
39728
39294
|
*/
|
|
39729
|
-
_this.
|
|
39295
|
+
_this.addItemTemplate = null;
|
|
39730
39296
|
/**
|
|
39731
|
-
*
|
|
39297
|
+
* The custom template, if any, that should be used when rendering the ADD BUTTON in the combo drop down
|
|
39298
|
+
*
|
|
39299
|
+
* ```typescript
|
|
39300
|
+
* // Set in typescript
|
|
39301
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39302
|
+
* myComponent.combo.emptyTemplate = myCustomTemplate;
|
|
39303
|
+
* ```
|
|
39732
39304
|
* ```html
|
|
39733
|
-
*
|
|
39305
|
+
* <!-- Set in markup -->
|
|
39306
|
+
* <igx-combo #combo>
|
|
39307
|
+
* ...
|
|
39308
|
+
* <ng-template igxComboEmpty>
|
|
39309
|
+
* <div class="combo--empty">
|
|
39310
|
+
* There are no items to display
|
|
39311
|
+
* </div>
|
|
39312
|
+
* </ng-template>
|
|
39313
|
+
* </igx-combo>
|
|
39734
39314
|
* ```
|
|
39735
39315
|
*/
|
|
39736
|
-
_this.
|
|
39316
|
+
_this.emptyTemplate = null;
|
|
39737
39317
|
/**
|
|
39738
|
-
*
|
|
39318
|
+
* The custom template, if any, that should be used when rendering the combo TOGGLE(open/close) button
|
|
39319
|
+
*
|
|
39320
|
+
* ```typescript
|
|
39321
|
+
* // Set in typescript
|
|
39322
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39323
|
+
* myComponent.combo.toggleIconTemplate = myCustomTemplate;
|
|
39324
|
+
* ```
|
|
39739
39325
|
* ```html
|
|
39740
|
-
*
|
|
39326
|
+
* <!-- Set in markup -->
|
|
39327
|
+
* <igx-combo #combo>
|
|
39328
|
+
* ...
|
|
39329
|
+
* <ng-template igxComboToggleIcon let-collapsed>
|
|
39330
|
+
* <igx-icon>{{ collapsed ? 'remove_circle' : 'remove_circle_outline'}}</igx-icon>
|
|
39331
|
+
* </ng-template>
|
|
39332
|
+
* </igx-combo>
|
|
39741
39333
|
* ```
|
|
39742
39334
|
*/
|
|
39743
|
-
_this.
|
|
39335
|
+
_this.toggleIconTemplate = null;
|
|
39744
39336
|
/**
|
|
39745
|
-
*
|
|
39746
|
-
*
|
|
39747
|
-
*
|
|
39337
|
+
* The custom template, if any, that should be used when rendering the combo CLEAR button
|
|
39338
|
+
*
|
|
39339
|
+
* ```typescript
|
|
39340
|
+
* // Set in typescript
|
|
39341
|
+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
|
|
39342
|
+
* myComponent.combo.clearIconTemplate = myCustomTemplate;
|
|
39343
|
+
* ```
|
|
39344
|
+
* ```html
|
|
39345
|
+
* <!-- Set in markup -->
|
|
39346
|
+
* <igx-combo #combo>
|
|
39347
|
+
* ...
|
|
39348
|
+
* <ng-template igxComboClearIcon>
|
|
39349
|
+
* <igx-icon>clear</igx-icon>
|
|
39350
|
+
* </ng-template>
|
|
39351
|
+
* </igx-combo>
|
|
39352
|
+
* ```
|
|
39748
39353
|
*/
|
|
39749
|
-
_this.
|
|
39354
|
+
_this.clearIconTemplate = null;
|
|
39355
|
+
/** @hidden @internal */
|
|
39356
|
+
_this.searchInput = null;
|
|
39750
39357
|
_this.dropdownContainer = null;
|
|
39751
|
-
/**
|
|
39752
|
-
* @hidden @internal
|
|
39753
|
-
*/
|
|
39358
|
+
/** @hidden @internal */
|
|
39754
39359
|
_this.customValueFlag = true;
|
|
39755
|
-
/**
|
|
39756
|
-
|
|
39757
|
-
|
|
39360
|
+
/** @hidden @internal */
|
|
39361
|
+
_this.filterValue = '';
|
|
39362
|
+
/** @hidden @internal */
|
|
39758
39363
|
_this.defaultFallbackGroup = 'Other';
|
|
39759
|
-
/**
|
|
39760
|
-
* @hidden @internal
|
|
39761
|
-
*/
|
|
39364
|
+
/** @hidden @internal */
|
|
39762
39365
|
_this.filteringOptions = {
|
|
39763
39366
|
caseSensitive: false
|
|
39764
39367
|
};
|
|
39765
|
-
|
|
39766
|
-
|
|
39767
|
-
*/
|
|
39768
|
-
_this.filteringLogic = exports.FilteringLogic.Or;
|
|
39769
|
-
/** @hidden @internal */
|
|
39770
|
-
_this.filterValue = '';
|
|
39771
|
-
_this.stringFilters = IgxStringFilteringOperand;
|
|
39772
|
-
_this.booleanFilters = IgxBooleanFilteringOperand;
|
|
39368
|
+
_this._data = [];
|
|
39369
|
+
_this._value = '';
|
|
39773
39370
|
_this._groupKey = '';
|
|
39774
|
-
_this.
|
|
39775
|
-
_this.
|
|
39776
|
-
_this.
|
|
39777
|
-
_this._type = null;
|
|
39371
|
+
_this._filteredData = [];
|
|
39372
|
+
_this._remoteSelection = {};
|
|
39373
|
+
_this._valid = IgxComboState.INITIAL;
|
|
39778
39374
|
_this.ngControl = null;
|
|
39779
39375
|
_this.destroy$ = new rxjs.Subject();
|
|
39780
|
-
_this.
|
|
39781
|
-
_this.
|
|
39376
|
+
_this._onTouchedCallback = rxjs.noop;
|
|
39377
|
+
_this._onChangeCallback = rxjs.noop;
|
|
39378
|
+
_this._type = null;
|
|
39379
|
+
_this._dataType = '';
|
|
39380
|
+
_this._searchValue = '';
|
|
39782
39381
|
_this._itemHeight = null;
|
|
39783
39382
|
_this._itemsMaxHeight = null;
|
|
39784
|
-
_this._remoteSelection = {};
|
|
39785
|
-
_this._onChangeCallback = rxjs.noop;
|
|
39786
|
-
_this._onTouchedCallback = rxjs.noop;
|
|
39787
|
-
_this._value = '';
|
|
39788
|
-
_this._valid = exports.IgxComboState.INITIAL;
|
|
39789
39383
|
_this.onStatusChanged = function () {
|
|
39790
39384
|
if ((_this.ngControl.control.touched || _this.ngControl.control.dirty) &&
|
|
39791
39385
|
(_this.ngControl.control.validator || _this.ngControl.control.asyncValidator)) {
|
|
39792
39386
|
if (!_this.collapsed || _this.inputGroup.isFocused) {
|
|
39793
|
-
_this.valid = _this.ngControl.invalid ?
|
|
39387
|
+
_this.valid = _this.ngControl.invalid ? IgxComboState.INVALID : IgxComboState.VALID;
|
|
39794
39388
|
}
|
|
39795
39389
|
else {
|
|
39796
|
-
_this.valid = _this.ngControl.invalid ?
|
|
39390
|
+
_this.valid = _this.ngControl.invalid ? IgxComboState.INVALID : IgxComboState.INITIAL;
|
|
39797
39391
|
}
|
|
39798
39392
|
}
|
|
39799
39393
|
else {
|
|
39800
39394
|
// B.P. 18 May 2021: IgxDatePicker does not reset its state upon resetForm #9526
|
|
39801
|
-
_this.valid =
|
|
39395
|
+
_this.valid = IgxComboState.INITIAL;
|
|
39802
39396
|
}
|
|
39803
39397
|
_this.manageRequiredAsterisk();
|
|
39804
39398
|
};
|
|
39805
|
-
_this.
|
|
39399
|
+
_this.findMatch = function (element) {
|
|
39400
|
+
var value = _this.displayKey ? element[_this.displayKey] : element;
|
|
39401
|
+
return value.toString().toLowerCase() === _this.searchValue.trim().toLowerCase();
|
|
39402
|
+
};
|
|
39806
39403
|
return _this;
|
|
39807
39404
|
}
|
|
39808
|
-
Object.defineProperty(
|
|
39809
|
-
/**
|
|
39810
|
-
* @hidden @internal
|
|
39811
|
-
*/
|
|
39812
|
-
get: function () {
|
|
39813
|
-
return this.filterable || this.allowCustomValues;
|
|
39814
|
-
},
|
|
39815
|
-
enumerable: false,
|
|
39816
|
-
configurable: true
|
|
39817
|
-
});
|
|
39818
|
-
Object.defineProperty(IgxComboComponent.prototype, "ariaExpanded", {
|
|
39819
|
-
/**
|
|
39820
|
-
* @hidden @internal
|
|
39821
|
-
*/
|
|
39822
|
-
get: function () {
|
|
39823
|
-
return !this.dropdown.collapsed;
|
|
39824
|
-
},
|
|
39825
|
-
enumerable: false,
|
|
39826
|
-
configurable: true
|
|
39827
|
-
});
|
|
39828
|
-
Object.defineProperty(IgxComboComponent.prototype, "hasPopUp", {
|
|
39829
|
-
/**
|
|
39830
|
-
* @hidden @internal
|
|
39831
|
-
*/
|
|
39832
|
-
get: function () {
|
|
39833
|
-
return 'listbox';
|
|
39834
|
-
},
|
|
39835
|
-
enumerable: false,
|
|
39836
|
-
configurable: true
|
|
39837
|
-
});
|
|
39838
|
-
Object.defineProperty(IgxComboComponent.prototype, "ariaOwns", {
|
|
39839
|
-
/**
|
|
39840
|
-
* @hidden @internal
|
|
39841
|
-
*/
|
|
39842
|
-
get: function () {
|
|
39843
|
-
return this.dropdown.id;
|
|
39844
|
-
},
|
|
39845
|
-
enumerable: false,
|
|
39846
|
-
configurable: true
|
|
39847
|
-
});
|
|
39848
|
-
Object.defineProperty(IgxComboComponent.prototype, "itemsMaxHeight", {
|
|
39405
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "itemsMaxHeight", {
|
|
39849
39406
|
/**
|
|
39850
39407
|
* Configures the drop down list height
|
|
39851
39408
|
*
|
|
@@ -39871,7 +39428,7 @@
|
|
|
39871
39428
|
enumerable: false,
|
|
39872
39429
|
configurable: true
|
|
39873
39430
|
});
|
|
39874
|
-
Object.defineProperty(
|
|
39431
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "itemHeight", {
|
|
39875
39432
|
/**
|
|
39876
39433
|
* Configures the drop down list item height
|
|
39877
39434
|
*
|
|
@@ -39897,17 +39454,7 @@
|
|
|
39897
39454
|
enumerable: false,
|
|
39898
39455
|
configurable: true
|
|
39899
39456
|
});
|
|
39900
|
-
Object.defineProperty(
|
|
39901
|
-
/**
|
|
39902
|
-
* @hidden @internal
|
|
39903
|
-
*/
|
|
39904
|
-
get: function () {
|
|
39905
|
-
return !this.value && !this.placeholder;
|
|
39906
|
-
},
|
|
39907
|
-
enumerable: false,
|
|
39908
|
-
configurable: true
|
|
39909
|
-
});
|
|
39910
|
-
Object.defineProperty(IgxComboComponent.prototype, "data", {
|
|
39457
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "data", {
|
|
39911
39458
|
/**
|
|
39912
39459
|
* Combo data source.
|
|
39913
39460
|
*
|
|
@@ -39925,9 +39472,9 @@
|
|
|
39925
39472
|
enumerable: false,
|
|
39926
39473
|
configurable: true
|
|
39927
39474
|
});
|
|
39928
|
-
Object.defineProperty(
|
|
39475
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "displayKey", {
|
|
39929
39476
|
/**
|
|
39930
|
-
*
|
|
39477
|
+
* Determines which column in the data source is used to determine the display value.
|
|
39931
39478
|
*
|
|
39932
39479
|
* ```typescript
|
|
39933
39480
|
* // get
|
|
@@ -39952,7 +39499,7 @@
|
|
|
39952
39499
|
enumerable: false,
|
|
39953
39500
|
configurable: true
|
|
39954
39501
|
});
|
|
39955
|
-
Object.defineProperty(
|
|
39502
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "groupKey", {
|
|
39956
39503
|
/**
|
|
39957
39504
|
* The item property by which items should be grouped inside the items list. Not usable if data is not of type Object[].
|
|
39958
39505
|
*
|
|
@@ -39978,7 +39525,31 @@
|
|
|
39978
39525
|
enumerable: false,
|
|
39979
39526
|
configurable: true
|
|
39980
39527
|
});
|
|
39981
|
-
Object.defineProperty(
|
|
39528
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "ariaExpanded", {
|
|
39529
|
+
/** @hidden @internal */
|
|
39530
|
+
get: function () {
|
|
39531
|
+
return !this.dropdown.collapsed;
|
|
39532
|
+
},
|
|
39533
|
+
enumerable: false,
|
|
39534
|
+
configurable: true
|
|
39535
|
+
});
|
|
39536
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "hasPopUp", {
|
|
39537
|
+
/** @hidden @internal */
|
|
39538
|
+
get: function () {
|
|
39539
|
+
return 'listbox';
|
|
39540
|
+
},
|
|
39541
|
+
enumerable: false,
|
|
39542
|
+
configurable: true
|
|
39543
|
+
});
|
|
39544
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "ariaOwns", {
|
|
39545
|
+
/** @hidden @internal */
|
|
39546
|
+
get: function () {
|
|
39547
|
+
return this.dropdown.id;
|
|
39548
|
+
},
|
|
39549
|
+
enumerable: false,
|
|
39550
|
+
configurable: true
|
|
39551
|
+
});
|
|
39552
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "type", {
|
|
39982
39553
|
/**
|
|
39983
39554
|
* An @Input property that sets how the combo will be styled.
|
|
39984
39555
|
* The allowed values are `line`, `box`, `border` and `search`. The default is `box`.
|
|
@@ -39995,7 +39566,40 @@
|
|
|
39995
39566
|
enumerable: false,
|
|
39996
39567
|
configurable: true
|
|
39997
39568
|
});
|
|
39998
|
-
Object.defineProperty(
|
|
39569
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "searchValue", {
|
|
39570
|
+
/** @hidden @internal */
|
|
39571
|
+
get: function () {
|
|
39572
|
+
return this._searchValue;
|
|
39573
|
+
},
|
|
39574
|
+
set: function (val) {
|
|
39575
|
+
this.filterValue = val;
|
|
39576
|
+
this._searchValue = val;
|
|
39577
|
+
},
|
|
39578
|
+
enumerable: false,
|
|
39579
|
+
configurable: true
|
|
39580
|
+
});
|
|
39581
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "isRemote", {
|
|
39582
|
+
/** @hidden @internal */
|
|
39583
|
+
get: function () {
|
|
39584
|
+
return this.totalItemCount > 0 &&
|
|
39585
|
+
this.valueKey &&
|
|
39586
|
+
this.dataType === DataTypes.COMPLEX;
|
|
39587
|
+
},
|
|
39588
|
+
enumerable: false,
|
|
39589
|
+
configurable: true
|
|
39590
|
+
});
|
|
39591
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "dataType", {
|
|
39592
|
+
/** @hidden @internal */
|
|
39593
|
+
get: function () {
|
|
39594
|
+
if (this.displayKey) {
|
|
39595
|
+
return DataTypes.COMPLEX;
|
|
39596
|
+
}
|
|
39597
|
+
return DataTypes.PRIMITIVE;
|
|
39598
|
+
},
|
|
39599
|
+
enumerable: false,
|
|
39600
|
+
configurable: true
|
|
39601
|
+
});
|
|
39602
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "valid", {
|
|
39999
39603
|
/**
|
|
40000
39604
|
* Gets if control is valid, when used in a form
|
|
40001
39605
|
*
|
|
@@ -40017,44 +39621,27 @@
|
|
|
40017
39621
|
*/
|
|
40018
39622
|
set: function (valid) {
|
|
40019
39623
|
this._valid = valid;
|
|
40020
|
-
this.comboInput.valid = exports.IgxInputState[
|
|
39624
|
+
this.comboInput.valid = exports.IgxInputState[IgxComboState[valid]];
|
|
40021
39625
|
},
|
|
40022
39626
|
enumerable: false,
|
|
40023
39627
|
configurable: true
|
|
40024
39628
|
});
|
|
40025
|
-
Object.defineProperty(
|
|
39629
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "value", {
|
|
40026
39630
|
/**
|
|
40027
|
-
*
|
|
39631
|
+
* The text displayed in the combo input
|
|
39632
|
+
*
|
|
39633
|
+
* ```typescript
|
|
39634
|
+
* // get
|
|
39635
|
+
* let comboValue = this.combo.value;
|
|
39636
|
+
* ```
|
|
40028
39637
|
*/
|
|
40029
39638
|
get: function () {
|
|
40030
|
-
return this.
|
|
40031
|
-
},
|
|
40032
|
-
set: function (val) {
|
|
40033
|
-
this.filterValue = val;
|
|
40034
|
-
this._searchValue = val;
|
|
39639
|
+
return this._value;
|
|
40035
39640
|
},
|
|
40036
39641
|
enumerable: false,
|
|
40037
39642
|
configurable: true
|
|
40038
39643
|
});
|
|
40039
|
-
|
|
40040
|
-
* @hidden @internal
|
|
40041
|
-
*/
|
|
40042
|
-
IgxComboComponent.prototype.onArrowDown = function (event) {
|
|
40043
|
-
event.preventDefault();
|
|
40044
|
-
event.stopPropagation();
|
|
40045
|
-
this.open();
|
|
40046
|
-
};
|
|
40047
|
-
/**
|
|
40048
|
-
* @hidden @internal
|
|
40049
|
-
*/
|
|
40050
|
-
IgxComboComponent.prototype.onInputClick = function (event) {
|
|
40051
|
-
event.stopPropagation();
|
|
40052
|
-
event.preventDefault();
|
|
40053
|
-
if (!this.disabled) {
|
|
40054
|
-
this.toggle();
|
|
40055
|
-
}
|
|
40056
|
-
};
|
|
40057
|
-
Object.defineProperty(IgxComboComponent.prototype, "virtualizationState", {
|
|
39644
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "virtualizationState", {
|
|
40058
39645
|
/**
|
|
40059
39646
|
* Defines the current state of the virtualized data. It contains `startIndex` and `chunkSize`
|
|
40060
39647
|
*
|
|
@@ -40080,7 +39667,21 @@
|
|
|
40080
39667
|
enumerable: false,
|
|
40081
39668
|
configurable: true
|
|
40082
39669
|
});
|
|
40083
|
-
Object.defineProperty(
|
|
39670
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "collapsed", {
|
|
39671
|
+
/**
|
|
39672
|
+
* Gets drop down state.
|
|
39673
|
+
*
|
|
39674
|
+
* ```typescript
|
|
39675
|
+
* let state = this.combo.collapsed;
|
|
39676
|
+
* ```
|
|
39677
|
+
*/
|
|
39678
|
+
get: function () {
|
|
39679
|
+
return this.dropdown.collapsed;
|
|
39680
|
+
},
|
|
39681
|
+
enumerable: false,
|
|
39682
|
+
configurable: true
|
|
39683
|
+
});
|
|
39684
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "totalItemCount", {
|
|
40084
39685
|
/**
|
|
40085
39686
|
* Gets total count of the virtual data items, when using remote service.
|
|
40086
39687
|
*
|
|
@@ -40106,98 +39707,116 @@
|
|
|
40106
39707
|
enumerable: false,
|
|
40107
39708
|
configurable: true
|
|
40108
39709
|
});
|
|
40109
|
-
Object.defineProperty(
|
|
40110
|
-
/**
|
|
40111
|
-
* The text displayed in the combo input
|
|
40112
|
-
*
|
|
40113
|
-
* ```typescript
|
|
40114
|
-
* // get
|
|
40115
|
-
* let comboValue = this.combo.value;
|
|
40116
|
-
* ```
|
|
40117
|
-
*/
|
|
40118
|
-
get: function () {
|
|
40119
|
-
return this._value;
|
|
40120
|
-
},
|
|
40121
|
-
enumerable: false,
|
|
40122
|
-
configurable: true
|
|
40123
|
-
});
|
|
40124
|
-
Object.defineProperty(IgxComboComponent.prototype, "filteredData", {
|
|
40125
|
-
/**
|
|
40126
|
-
* @hidden @internal
|
|
40127
|
-
*/
|
|
39710
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "template", {
|
|
39711
|
+
/** @hidden @internal */
|
|
40128
39712
|
get: function () {
|
|
40129
|
-
|
|
40130
|
-
|
|
40131
|
-
|
|
40132
|
-
|
|
40133
|
-
|
|
40134
|
-
|
|
40135
|
-
|
|
40136
|
-
this.
|
|
39713
|
+
this._dataType = this.dataType;
|
|
39714
|
+
if (this.itemTemplate) {
|
|
39715
|
+
return this.itemTemplate;
|
|
39716
|
+
}
|
|
39717
|
+
if (this._dataType === DataTypes.COMPLEX) {
|
|
39718
|
+
return this.complexTemplate;
|
|
39719
|
+
}
|
|
39720
|
+
return this.primitiveTemplate;
|
|
40137
39721
|
},
|
|
40138
39722
|
enumerable: false,
|
|
40139
39723
|
configurable: true
|
|
40140
39724
|
});
|
|
40141
|
-
/**
|
|
40142
|
-
|
|
40143
|
-
|
|
40144
|
-
|
|
40145
|
-
|
|
40146
|
-
this.dropdown.focusedItem = this.dropdown.items[0];
|
|
40147
|
-
this.dropdownContainer.nativeElement.focus();
|
|
40148
|
-
}
|
|
40149
|
-
else if (event.key === 'Escape' || event.key === 'Esc') {
|
|
40150
|
-
this.toggle();
|
|
40151
|
-
}
|
|
39725
|
+
/** @hidden @internal */
|
|
39726
|
+
IgxComboBaseDirective.prototype.onArrowDown = function (event) {
|
|
39727
|
+
event.preventDefault();
|
|
39728
|
+
event.stopPropagation();
|
|
39729
|
+
this.open();
|
|
40152
39730
|
};
|
|
40153
|
-
/**
|
|
40154
|
-
|
|
40155
|
-
|
|
40156
|
-
|
|
40157
|
-
|
|
40158
|
-
|
|
40159
|
-
|
|
40160
|
-
|
|
39731
|
+
/** @hidden @internal */
|
|
39732
|
+
IgxComboBaseDirective.prototype.ngOnInit = function () {
|
|
39733
|
+
this.ngControl = this._injector.get(forms.NgControl, null);
|
|
39734
|
+
var targetElement = this.elementRef.nativeElement;
|
|
39735
|
+
this._overlaySettings = {
|
|
39736
|
+
target: targetElement,
|
|
39737
|
+
scrollStrategy: new AbsoluteScrollStrategy(),
|
|
39738
|
+
positionStrategy: new AutoPositionStrategy(),
|
|
39739
|
+
modal: false,
|
|
39740
|
+
closeOnOutsideClick: true,
|
|
39741
|
+
excludeFromOutsideClick: [targetElement]
|
|
39742
|
+
};
|
|
39743
|
+
this.selectionService.set(this.id, new Set());
|
|
39744
|
+
this._iconService.addSvgIconFromText(materialIconsExtended.caseSensitive.name, materialIconsExtended.caseSensitive.value, 'imx-icons');
|
|
39745
|
+
};
|
|
39746
|
+
/** @hidden @internal */
|
|
39747
|
+
IgxComboBaseDirective.prototype.ngAfterViewInit = function () {
|
|
39748
|
+
var _this = this;
|
|
39749
|
+
this.filteredData = __spreadArray([], __read(this.data));
|
|
39750
|
+
if (this.ngControl) {
|
|
39751
|
+
this.ngControl.statusChanges.pipe(operators.takeUntil(this.destroy$)).subscribe(this.onStatusChanged);
|
|
39752
|
+
this.manageRequiredAsterisk();
|
|
39753
|
+
this.cdr.detectChanges();
|
|
40161
39754
|
}
|
|
39755
|
+
this.virtDir.chunkPreload.pipe(operators.takeUntil(this.destroy$)).subscribe(function (e) {
|
|
39756
|
+
var eventArgs = Object.assign({}, e, { owner: _this });
|
|
39757
|
+
_this.dataPreLoad.emit(eventArgs);
|
|
39758
|
+
});
|
|
39759
|
+
};
|
|
39760
|
+
/** @hidden @internal */
|
|
39761
|
+
IgxComboBaseDirective.prototype.ngOnDestroy = function () {
|
|
39762
|
+
this.destroy$.next();
|
|
39763
|
+
this.destroy$.complete();
|
|
39764
|
+
this.comboAPI.clear();
|
|
39765
|
+
this.selectionService.clear(this.id);
|
|
40162
39766
|
};
|
|
40163
39767
|
/**
|
|
40164
|
-
*
|
|
39768
|
+
* A method that opens/closes the combo.
|
|
39769
|
+
*
|
|
39770
|
+
* ```html
|
|
39771
|
+
* <button (click)="combo.toggle()">Toggle Combo</button>
|
|
39772
|
+
* <igx-combo #combo></igx-combo>
|
|
39773
|
+
* ```
|
|
40165
39774
|
*/
|
|
40166
|
-
|
|
40167
|
-
|
|
40168
|
-
|
|
40169
|
-
searchText: event,
|
|
40170
|
-
owner: this,
|
|
40171
|
-
cancel: false
|
|
40172
|
-
};
|
|
40173
|
-
this.searchInputUpdate.emit(args);
|
|
40174
|
-
if (args.cancel) {
|
|
40175
|
-
this.filterValue = null;
|
|
40176
|
-
}
|
|
40177
|
-
}
|
|
40178
|
-
this.checkMatch();
|
|
39775
|
+
IgxComboBaseDirective.prototype.toggle = function () {
|
|
39776
|
+
var overlaySettings = Object.assign({}, this._overlaySettings, this.overlaySettings);
|
|
39777
|
+
this.dropdown.toggle(overlaySettings);
|
|
40179
39778
|
};
|
|
40180
|
-
|
|
40181
|
-
|
|
40182
|
-
|
|
40183
|
-
|
|
40184
|
-
|
|
40185
|
-
|
|
40186
|
-
|
|
40187
|
-
|
|
40188
|
-
|
|
40189
|
-
},
|
|
40190
|
-
|
|
40191
|
-
|
|
40192
|
-
|
|
40193
|
-
|
|
39779
|
+
/**
|
|
39780
|
+
* A method that opens the combo.
|
|
39781
|
+
*
|
|
39782
|
+
* ```html
|
|
39783
|
+
* <button (click)="combo.open()">Open Combo</button>
|
|
39784
|
+
* <igx-combo #combo></igx-combo>
|
|
39785
|
+
* ```
|
|
39786
|
+
*/
|
|
39787
|
+
IgxComboBaseDirective.prototype.open = function () {
|
|
39788
|
+
var overlaySettings = Object.assign({}, this._overlaySettings, this.overlaySettings);
|
|
39789
|
+
this.dropdown.open(overlaySettings);
|
|
39790
|
+
};
|
|
39791
|
+
/**
|
|
39792
|
+
* A method that closes the combo.
|
|
39793
|
+
*
|
|
39794
|
+
* ```html
|
|
39795
|
+
* <button (click)="combo.close()">Close Combo</button>
|
|
39796
|
+
* <igx-combo #combo></igx-combo>
|
|
39797
|
+
* ```
|
|
39798
|
+
*/
|
|
39799
|
+
IgxComboBaseDirective.prototype.close = function () {
|
|
39800
|
+
this.dropdown.close();
|
|
39801
|
+
};
|
|
39802
|
+
/**
|
|
39803
|
+
* Triggers change detection on the combo view
|
|
39804
|
+
*/
|
|
39805
|
+
IgxComboBaseDirective.prototype.triggerCheck = function () {
|
|
39806
|
+
this.cdr.detectChanges();
|
|
39807
|
+
};
|
|
39808
|
+
Object.defineProperty(IgxComboBaseDirective.prototype, "selection", {
|
|
40194
39809
|
/**
|
|
40195
|
-
*
|
|
39810
|
+
* Get current selection state
|
|
39811
|
+
*
|
|
39812
|
+
* @returns Array of selected items
|
|
39813
|
+
* ```typescript
|
|
39814
|
+
* let selectedItems = this.combo.selectedItems();
|
|
39815
|
+
* ```
|
|
40196
39816
|
*/
|
|
40197
39817
|
get: function () {
|
|
40198
|
-
|
|
40199
|
-
|
|
40200
|
-
this.dataType === DataTypes.COMPLEX;
|
|
39818
|
+
var items = Array.from(this.selectionService.get(this.id));
|
|
39819
|
+
return items;
|
|
40201
39820
|
},
|
|
40202
39821
|
enumerable: false,
|
|
40203
39822
|
configurable: true
|
|
@@ -40208,48 +39827,23 @@
|
|
|
40208
39827
|
* @hidden
|
|
40209
39828
|
* @internal
|
|
40210
39829
|
*/
|
|
40211
|
-
|
|
40212
|
-
return this.
|
|
40213
|
-
};
|
|
40214
|
-
/**
|
|
40215
|
-
* Triggers change detection on the combo view
|
|
40216
|
-
*/
|
|
40217
|
-
IgxComboComponent.prototype.triggerCheck = function () {
|
|
40218
|
-
this.cdr.detectChanges();
|
|
40219
|
-
};
|
|
40220
|
-
/**
|
|
40221
|
-
* @hidden @internal
|
|
40222
|
-
*/
|
|
40223
|
-
IgxComboComponent.prototype.isAddButtonVisible = function () {
|
|
40224
|
-
// This should always return a boolean value. If this.searchValue was '', it returns '' instead of false;
|
|
40225
|
-
return this.searchValue !== '' && this.customValueFlag;
|
|
39830
|
+
IgxComboBaseDirective.prototype.isItemSelected = function (item) {
|
|
39831
|
+
return this.selectionService.is_item_selected(this.id, item);
|
|
40226
39832
|
};
|
|
40227
|
-
/**
|
|
40228
|
-
|
|
40229
|
-
|
|
40230
|
-
|
|
40231
|
-
if (evt.checked) {
|
|
40232
|
-
this.selectAllItems();
|
|
40233
|
-
}
|
|
40234
|
-
else {
|
|
40235
|
-
this.deselectAllItems();
|
|
40236
|
-
}
|
|
40237
|
-
};
|
|
40238
|
-
/**
|
|
40239
|
-
* @hidden @internal
|
|
40240
|
-
*/
|
|
40241
|
-
IgxComboComponent.prototype.addItemToCollection = function () {
|
|
40242
|
-
var _a, _b;
|
|
39833
|
+
/** @hidden @internal */
|
|
39834
|
+
IgxComboBaseDirective.prototype.addItemToCollection = function () {
|
|
39835
|
+
var _b, _c;
|
|
39836
|
+
var _a;
|
|
40243
39837
|
if (!this.searchValue) {
|
|
40244
39838
|
return;
|
|
40245
39839
|
}
|
|
40246
39840
|
var newValue = this.searchValue.trim();
|
|
40247
|
-
var addedItem = this.displayKey ? (
|
|
40248
|
-
|
|
40249
|
-
|
|
40250
|
-
|
|
39841
|
+
var addedItem = this.displayKey ? (_b = {},
|
|
39842
|
+
_b[this.valueKey] = newValue,
|
|
39843
|
+
_b[this.displayKey] = newValue,
|
|
39844
|
+
_b) : newValue;
|
|
40251
39845
|
if (this.groupKey) {
|
|
40252
|
-
Object.assign(addedItem, (
|
|
39846
|
+
Object.assign(addedItem, (_c = {}, _c[this.groupKey] = this.defaultFallbackGroup, _c));
|
|
40253
39847
|
}
|
|
40254
39848
|
// expose shallow copy instead of this.data in event args so this.data can't be mutated
|
|
40255
39849
|
var oldCollection = __spreadArray([], __read(this.data));
|
|
@@ -40267,145 +39861,721 @@
|
|
|
40267
39861
|
this.data.push(args.addedItem);
|
|
40268
39862
|
// trigger re-render
|
|
40269
39863
|
this.data = cloneArray(this.data);
|
|
40270
|
-
this.
|
|
39864
|
+
this.select(this.valueKey !== null && this.valueKey !== undefined ?
|
|
40271
39865
|
[args.addedItem[this.valueKey]] : [args.addedItem], false);
|
|
40272
39866
|
this.customValueFlag = false;
|
|
40273
|
-
this.searchInput.nativeElement.focus();
|
|
39867
|
+
(_a = this.searchInput) === null || _a === void 0 ? void 0 : _a.nativeElement.focus();
|
|
40274
39868
|
this.dropdown.focusedItem = null;
|
|
40275
39869
|
this.virtDir.scrollTo(0);
|
|
40276
39870
|
};
|
|
40277
|
-
/**
|
|
40278
|
-
|
|
40279
|
-
|
|
40280
|
-
|
|
40281
|
-
|
|
40282
|
-
|
|
40283
|
-
|
|
40284
|
-
|
|
40285
|
-
|
|
40286
|
-
|
|
40287
|
-
|
|
40288
|
-
|
|
40289
|
-
|
|
40290
|
-
|
|
39871
|
+
/** @hidden @internal */
|
|
39872
|
+
IgxComboBaseDirective.prototype.isAddButtonVisible = function () {
|
|
39873
|
+
// This should always return a boolean value. If this.searchValue was '', it returns '' instead of false;
|
|
39874
|
+
return this.searchValue !== '' && this.customValueFlag;
|
|
39875
|
+
};
|
|
39876
|
+
/** @hidden @internal */
|
|
39877
|
+
IgxComboBaseDirective.prototype.handleInputChange = function (event) {
|
|
39878
|
+
if (event !== undefined) {
|
|
39879
|
+
var args = {
|
|
39880
|
+
searchText: typeof event === 'string' ? event : event.target.value,
|
|
39881
|
+
owner: this,
|
|
39882
|
+
cancel: false
|
|
39883
|
+
};
|
|
39884
|
+
this.searchInputUpdate.emit(args);
|
|
39885
|
+
if (args.cancel) {
|
|
39886
|
+
this.filterValue = null;
|
|
40291
39887
|
}
|
|
40292
39888
|
}
|
|
39889
|
+
this.checkMatch();
|
|
40293
39890
|
};
|
|
40294
39891
|
/**
|
|
40295
|
-
*
|
|
39892
|
+
* Event handlers
|
|
39893
|
+
*
|
|
39894
|
+
* @hidden
|
|
39895
|
+
* @internal
|
|
40296
39896
|
*/
|
|
40297
|
-
|
|
39897
|
+
IgxComboBaseDirective.prototype.handleOpening = function (e) {
|
|
39898
|
+
var args = { owner: this, event: e.event, cancel: e.cancel };
|
|
39899
|
+
this.opening.emit(args);
|
|
39900
|
+
e.cancel = args.cancel;
|
|
39901
|
+
};
|
|
39902
|
+
/** @hidden @internal */
|
|
39903
|
+
IgxComboBaseDirective.prototype.handleClosing = function (e) {
|
|
39904
|
+
var _a;
|
|
39905
|
+
var args = { owner: this, event: e.event, cancel: e.cancel };
|
|
39906
|
+
this.closing.emit(args);
|
|
39907
|
+
e.cancel = args.cancel;
|
|
39908
|
+
if (e.cancel) {
|
|
39909
|
+
return;
|
|
39910
|
+
}
|
|
39911
|
+
this.searchValue = '';
|
|
39912
|
+
if (!e.event) {
|
|
39913
|
+
(_a = this.comboInput) === null || _a === void 0 ? void 0 : _a.nativeElement.focus();
|
|
39914
|
+
}
|
|
39915
|
+
};
|
|
39916
|
+
/** @hidden @internal */
|
|
39917
|
+
IgxComboBaseDirective.prototype.handleClosed = function () {
|
|
39918
|
+
this.closed.emit({ owner: this });
|
|
39919
|
+
};
|
|
39920
|
+
/** @hidden @internal */
|
|
39921
|
+
IgxComboBaseDirective.prototype.handleKeyDown = function (event) {
|
|
39922
|
+
if (event.key === 'ArrowUp' || event.key === 'Up') {
|
|
39923
|
+
event.preventDefault();
|
|
39924
|
+
event.stopPropagation();
|
|
39925
|
+
this.close();
|
|
39926
|
+
}
|
|
39927
|
+
};
|
|
39928
|
+
/** @hidden @internal */
|
|
39929
|
+
IgxComboBaseDirective.prototype.registerOnChange = function (fn) {
|
|
39930
|
+
this._onChangeCallback = fn;
|
|
39931
|
+
};
|
|
39932
|
+
/** @hidden @internal */
|
|
39933
|
+
IgxComboBaseDirective.prototype.registerOnTouched = function (fn) {
|
|
39934
|
+
this._onTouchedCallback = fn;
|
|
39935
|
+
};
|
|
39936
|
+
/** @hidden @internal */
|
|
39937
|
+
IgxComboBaseDirective.prototype.setDisabledState = function (isDisabled) {
|
|
39938
|
+
this.disabled = isDisabled;
|
|
39939
|
+
};
|
|
39940
|
+
/** @hidden @internal */
|
|
39941
|
+
IgxComboBaseDirective.prototype.onClick = function (event) {
|
|
39942
|
+
event.stopPropagation();
|
|
39943
|
+
event.preventDefault();
|
|
39944
|
+
if (!this.disabled) {
|
|
39945
|
+
this.toggle();
|
|
39946
|
+
}
|
|
39947
|
+
};
|
|
39948
|
+
/** @hidden @internal */
|
|
39949
|
+
IgxComboBaseDirective.prototype.onBlur = function () {
|
|
40298
39950
|
if (this.collapsed) {
|
|
40299
39951
|
this._onTouchedCallback();
|
|
40300
39952
|
if (this.ngControl && this.ngControl.invalid) {
|
|
40301
|
-
this.valid =
|
|
39953
|
+
this.valid = IgxComboState.INVALID;
|
|
40302
39954
|
}
|
|
40303
39955
|
else {
|
|
40304
|
-
this.valid =
|
|
39956
|
+
this.valid = IgxComboState.INITIAL;
|
|
39957
|
+
}
|
|
39958
|
+
}
|
|
39959
|
+
};
|
|
39960
|
+
/** @hidden @internal */
|
|
39961
|
+
IgxComboBaseDirective.prototype.toggleCaseSensitive = function () {
|
|
39962
|
+
this.filteringOptions = { caseSensitive: !this.filteringOptions.caseSensitive };
|
|
39963
|
+
};
|
|
39964
|
+
/** if there is a valueKey - map the keys to data items, else - just return the keys */
|
|
39965
|
+
IgxComboBaseDirective.prototype.convertKeysToItems = function (keys) {
|
|
39966
|
+
var _this = this;
|
|
39967
|
+
if (this.comboAPI.valueKey === null) {
|
|
39968
|
+
return keys;
|
|
39969
|
+
}
|
|
39970
|
+
// map keys vs. filter data to retain the order of the selected items
|
|
39971
|
+
return keys.map(function (key) { return _this.data.find(function (entry) { return entry[_this.valueKey] === key; }); }).filter(function (e) { return e !== undefined; });
|
|
39972
|
+
};
|
|
39973
|
+
IgxComboBaseDirective.prototype.checkMatch = function () {
|
|
39974
|
+
var itemMatch = this.filteredData.some(this.findMatch);
|
|
39975
|
+
this.customValueFlag = this.allowCustomValues && !itemMatch;
|
|
39976
|
+
};
|
|
39977
|
+
IgxComboBaseDirective.prototype.manageRequiredAsterisk = function () {
|
|
39978
|
+
if (this.ngControl && this.ngControl.control.validator) {
|
|
39979
|
+
// Run the validation with empty object to check if required is enabled.
|
|
39980
|
+
var error = this.ngControl.control.validator({});
|
|
39981
|
+
this.inputGroup.isRequired = error && error.required;
|
|
39982
|
+
}
|
|
39983
|
+
};
|
|
39984
|
+
/** Contains key-value pairs of the selected valueKeys and their resp. displayKeys */
|
|
39985
|
+
IgxComboBaseDirective.prototype.registerRemoteEntries = function (ids, add) {
|
|
39986
|
+
var e_1, _b, e_2, _c;
|
|
39987
|
+
if (add === void 0) { add = true; }
|
|
39988
|
+
if (add) {
|
|
39989
|
+
var selection = this.getValueDisplayPairs(ids);
|
|
39990
|
+
try {
|
|
39991
|
+
for (var selection_1 = __values(selection), selection_1_1 = selection_1.next(); !selection_1_1.done; selection_1_1 = selection_1.next()) {
|
|
39992
|
+
var entry = selection_1_1.value;
|
|
39993
|
+
this._remoteSelection[entry[this.valueKey]] = entry[this.displayKey];
|
|
39994
|
+
}
|
|
39995
|
+
}
|
|
39996
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
39997
|
+
finally {
|
|
39998
|
+
try {
|
|
39999
|
+
if (selection_1_1 && !selection_1_1.done && (_b = selection_1.return)) _b.call(selection_1);
|
|
40000
|
+
}
|
|
40001
|
+
finally { if (e_1) throw e_1.error; }
|
|
40002
|
+
}
|
|
40003
|
+
}
|
|
40004
|
+
else {
|
|
40005
|
+
try {
|
|
40006
|
+
for (var ids_1 = __values(ids), ids_1_1 = ids_1.next(); !ids_1_1.done; ids_1_1 = ids_1.next()) {
|
|
40007
|
+
var entry = ids_1_1.value;
|
|
40008
|
+
delete this._remoteSelection[entry];
|
|
40009
|
+
}
|
|
40010
|
+
}
|
|
40011
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
40012
|
+
finally {
|
|
40013
|
+
try {
|
|
40014
|
+
if (ids_1_1 && !ids_1_1.done && (_c = ids_1.return)) _c.call(ids_1);
|
|
40015
|
+
}
|
|
40016
|
+
finally { if (e_2) throw e_2.error; }
|
|
40305
40017
|
}
|
|
40306
40018
|
}
|
|
40307
40019
|
};
|
|
40308
40020
|
/**
|
|
40309
|
-
*
|
|
40021
|
+
* For `id: any[]` returns a mapped `{ [combo.valueKey]: any, [combo.displayKey]: any }[]`
|
|
40310
40022
|
*/
|
|
40311
|
-
|
|
40312
|
-
|
|
40313
|
-
|
|
40314
|
-
|
|
40315
|
-
|
|
40316
|
-
|
|
40317
|
-
|
|
40318
|
-
|
|
40319
|
-
|
|
40320
|
-
|
|
40321
|
-
|
|
40322
|
-
|
|
40323
|
-
|
|
40023
|
+
IgxComboBaseDirective.prototype.getValueDisplayPairs = function (ids) {
|
|
40024
|
+
var _this = this;
|
|
40025
|
+
return this.data.filter(function (entry) { return ids.indexOf(entry[_this.valueKey]) > -1; }).map(function (e) {
|
|
40026
|
+
var _b;
|
|
40027
|
+
return (_b = {},
|
|
40028
|
+
_b[_this.valueKey] = e[_this.valueKey],
|
|
40029
|
+
_b[_this.displayKey] = e[_this.displayKey],
|
|
40030
|
+
_b);
|
|
40031
|
+
});
|
|
40032
|
+
};
|
|
40033
|
+
IgxComboBaseDirective.prototype.getRemoteSelection = function (newSelection, oldSelection) {
|
|
40034
|
+
var _this = this;
|
|
40035
|
+
if (!newSelection.length) {
|
|
40036
|
+
// If new selection is empty, clear all items
|
|
40037
|
+
this.registerRemoteEntries(oldSelection, false);
|
|
40038
|
+
return '';
|
|
40039
|
+
}
|
|
40040
|
+
var removedItems = oldSelection.filter(function (e) { return newSelection.indexOf(e) < 0; });
|
|
40041
|
+
var addedItems = newSelection.filter(function (e) { return oldSelection.indexOf(e) < 0; });
|
|
40042
|
+
this.registerRemoteEntries(addedItems);
|
|
40043
|
+
this.registerRemoteEntries(removedItems, false);
|
|
40044
|
+
return Object.keys(this._remoteSelection).map(function (e) { return _this._remoteSelection[e]; }).join(', ');
|
|
40045
|
+
};
|
|
40046
|
+
return IgxComboBaseDirective;
|
|
40047
|
+
}(DisplayDensityBase));
|
|
40048
|
+
IgxComboBaseDirective.decorators = [
|
|
40049
|
+
{ type: i0.Directive }
|
|
40050
|
+
];
|
|
40051
|
+
IgxComboBaseDirective.ctorParameters = function () { return [
|
|
40052
|
+
{ type: i0.ElementRef },
|
|
40053
|
+
{ type: i0.ChangeDetectorRef },
|
|
40054
|
+
{ type: IgxSelectionAPIService },
|
|
40055
|
+
{ type: IgxComboAPIService },
|
|
40056
|
+
{ type: IgxIconService },
|
|
40057
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [DisplayDensityToken,] }] },
|
|
40058
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [IGX_INPUT_GROUP_TYPE,] }] },
|
|
40059
|
+
{ type: i0.Injector, decorators: [{ type: i0.Optional }] }
|
|
40060
|
+
]; };
|
|
40061
|
+
IgxComboBaseDirective.propDecorators = {
|
|
40062
|
+
showSearchCaseIcon: [{ type: i0.Input }],
|
|
40063
|
+
overlaySettings: [{ type: i0.Input }],
|
|
40064
|
+
id: [{ type: i0.HostBinding, args: ['attr.id',] }, { type: i0.Input }],
|
|
40065
|
+
width: [{ type: i0.HostBinding, args: ['style.width',] }, { type: i0.Input }],
|
|
40066
|
+
allowCustomValues: [{ type: i0.Input }],
|
|
40067
|
+
itemsMaxHeight: [{ type: i0.Input }],
|
|
40068
|
+
itemHeight: [{ type: i0.Input }],
|
|
40069
|
+
itemsWidth: [{ type: i0.Input }],
|
|
40070
|
+
placeholder: [{ type: i0.Input }],
|
|
40071
|
+
data: [{ type: i0.Input }],
|
|
40072
|
+
valueKey: [{ type: i0.Input }],
|
|
40073
|
+
displayKey: [{ type: i0.Input }],
|
|
40074
|
+
groupKey: [{ type: i0.Input }],
|
|
40075
|
+
filterable: [{ type: i0.Input }],
|
|
40076
|
+
ariaLabelledBy: [{ type: i0.Input }, { type: i0.HostBinding, args: ['attr.aria-labelledby',] }],
|
|
40077
|
+
cssClass: [{ type: i0.HostBinding, args: ['class.igx-combo',] }],
|
|
40078
|
+
role: [{ type: i0.HostBinding, args: ["attr.role",] }],
|
|
40079
|
+
ariaExpanded: [{ type: i0.HostBinding, args: ['attr.aria-expanded',] }],
|
|
40080
|
+
hasPopUp: [{ type: i0.HostBinding, args: ['attr.aria-haspopup',] }],
|
|
40081
|
+
ariaOwns: [{ type: i0.HostBinding, args: ['attr.aria-owns',] }],
|
|
40082
|
+
disabled: [{ type: i0.Input }],
|
|
40083
|
+
type: [{ type: i0.Input }],
|
|
40084
|
+
opening: [{ type: i0.Output }],
|
|
40085
|
+
opened: [{ type: i0.Output }],
|
|
40086
|
+
closing: [{ type: i0.Output }],
|
|
40087
|
+
closed: [{ type: i0.Output }],
|
|
40088
|
+
addition: [{ type: i0.Output }],
|
|
40089
|
+
searchInputUpdate: [{ type: i0.Output }],
|
|
40090
|
+
dataPreLoad: [{ type: i0.Output }],
|
|
40091
|
+
itemTemplate: [{ type: i0.ContentChild, args: [IgxComboItemDirective, { read: i0.TemplateRef },] }],
|
|
40092
|
+
headerTemplate: [{ type: i0.ContentChild, args: [IgxComboHeaderDirective, { read: i0.TemplateRef },] }],
|
|
40093
|
+
footerTemplate: [{ type: i0.ContentChild, args: [IgxComboFooterDirective, { read: i0.TemplateRef },] }],
|
|
40094
|
+
headerItemTemplate: [{ type: i0.ContentChild, args: [IgxComboHeaderItemDirective, { read: i0.TemplateRef },] }],
|
|
40095
|
+
addItemTemplate: [{ type: i0.ContentChild, args: [IgxComboAddItemDirective, { read: i0.TemplateRef },] }],
|
|
40096
|
+
emptyTemplate: [{ type: i0.ContentChild, args: [IgxComboEmptyDirective, { read: i0.TemplateRef },] }],
|
|
40097
|
+
toggleIconTemplate: [{ type: i0.ContentChild, args: [IgxComboToggleIconDirective, { read: i0.TemplateRef },] }],
|
|
40098
|
+
clearIconTemplate: [{ type: i0.ContentChild, args: [IgxComboClearIconDirective, { read: i0.TemplateRef },] }],
|
|
40099
|
+
inputGroup: [{ type: i0.ViewChild, args: ['inputGroup', { read: IgxInputGroupComponent, static: true },] }],
|
|
40100
|
+
comboInput: [{ type: i0.ViewChild, args: ['comboInput', { read: IgxInputDirective, static: true },] }],
|
|
40101
|
+
searchInput: [{ type: i0.ViewChild, args: ['searchInput',] }],
|
|
40102
|
+
virtualScrollContainer: [{ type: i0.ViewChild, args: [IgxForOfDirective, { static: true },] }],
|
|
40103
|
+
virtDir: [{ type: i0.ViewChild, args: [IgxForOfDirective, { read: IgxForOfDirective, static: true },] }],
|
|
40104
|
+
dropdownContainer: [{ type: i0.ViewChild, args: ['dropdownItemContainer', { static: true },] }],
|
|
40105
|
+
primitiveTemplate: [{ type: i0.ViewChild, args: ['primitive', { read: i0.TemplateRef, static: true },] }],
|
|
40106
|
+
complexTemplate: [{ type: i0.ViewChild, args: ['complex', { read: i0.TemplateRef, static: true },] }],
|
|
40107
|
+
onArrowDown: [{ type: i0.HostListener, args: ['keydown.ArrowDown', ['$event'],] }, { type: i0.HostListener, args: ['keydown.Alt.ArrowDown', ['$event'],] }]
|
|
40108
|
+
};
|
|
40109
|
+
|
|
40110
|
+
/**
|
|
40111
|
+
* @hidden
|
|
40112
|
+
*/
|
|
40113
|
+
var IgxComboAddItemComponent = /** @class */ (function (_super) {
|
|
40114
|
+
__extends(IgxComboAddItemComponent, _super);
|
|
40115
|
+
function IgxComboAddItemComponent() {
|
|
40116
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
40117
|
+
}
|
|
40118
|
+
Object.defineProperty(IgxComboAddItemComponent.prototype, "selected", {
|
|
40119
|
+
get: function () {
|
|
40120
|
+
return false;
|
|
40121
|
+
},
|
|
40122
|
+
set: function (value) {
|
|
40123
|
+
},
|
|
40124
|
+
enumerable: false,
|
|
40125
|
+
configurable: true
|
|
40126
|
+
});
|
|
40127
|
+
/**
|
|
40128
|
+
* @inheritdoc
|
|
40129
|
+
*/
|
|
40130
|
+
IgxComboAddItemComponent.prototype.clicked = function (event) {
|
|
40131
|
+
this.comboAPI.disableTransitions = false;
|
|
40132
|
+
this.comboAPI.add_custom_item();
|
|
40324
40133
|
};
|
|
40134
|
+
return IgxComboAddItemComponent;
|
|
40135
|
+
}(IgxComboItemComponent));
|
|
40136
|
+
IgxComboAddItemComponent.decorators = [
|
|
40137
|
+
{ type: i0.Component, args: [{
|
|
40138
|
+
selector: 'igx-combo-add-item',
|
|
40139
|
+
template: '<ng-content></ng-content>',
|
|
40140
|
+
providers: [{ provide: IgxComboItemComponent, useExisting: IgxComboAddItemComponent }]
|
|
40141
|
+
},] }
|
|
40142
|
+
];
|
|
40143
|
+
|
|
40144
|
+
/** @hidden */
|
|
40145
|
+
var IgxComboDropDownComponent = /** @class */ (function (_super) {
|
|
40146
|
+
__extends(IgxComboDropDownComponent, _super);
|
|
40147
|
+
function IgxComboDropDownComponent(elementRef, cdr, platform, selection, combo, comboAPI, _displayDensityOptions) {
|
|
40148
|
+
var _this = _super.call(this, elementRef, cdr, platform, selection, _displayDensityOptions) || this;
|
|
40149
|
+
_this.elementRef = elementRef;
|
|
40150
|
+
_this.cdr = cdr;
|
|
40151
|
+
_this.platform = platform;
|
|
40152
|
+
_this.selection = selection;
|
|
40153
|
+
_this.combo = combo;
|
|
40154
|
+
_this.comboAPI = comboAPI;
|
|
40155
|
+
_this._displayDensityOptions = _displayDensityOptions;
|
|
40156
|
+
/** @hidden @internal */
|
|
40157
|
+
_this.singleMode = false;
|
|
40158
|
+
/**
|
|
40159
|
+
* @hidden
|
|
40160
|
+
* @internal
|
|
40161
|
+
*/
|
|
40162
|
+
_this.children = null;
|
|
40163
|
+
_this.scrollHandler = function () {
|
|
40164
|
+
_this.comboAPI.disableTransitions = true;
|
|
40165
|
+
};
|
|
40166
|
+
return _this;
|
|
40167
|
+
}
|
|
40168
|
+
Object.defineProperty(IgxComboDropDownComponent.prototype, "scrollContainer", {
|
|
40169
|
+
/** @hidden @internal */
|
|
40170
|
+
get: function () {
|
|
40171
|
+
return this.virtDir.dc.location.nativeElement;
|
|
40172
|
+
},
|
|
40173
|
+
enumerable: false,
|
|
40174
|
+
configurable: true
|
|
40175
|
+
});
|
|
40176
|
+
Object.defineProperty(IgxComboDropDownComponent.prototype, "isScrolledToLast", {
|
|
40177
|
+
get: function () {
|
|
40178
|
+
var scrollTop = this.virtDir.scrollPosition;
|
|
40179
|
+
var scrollHeight = this.virtDir.getScroll().scrollHeight;
|
|
40180
|
+
return Math.floor(scrollTop + this.virtDir.igxForContainerSize) === scrollHeight;
|
|
40181
|
+
},
|
|
40182
|
+
enumerable: false,
|
|
40183
|
+
configurable: true
|
|
40184
|
+
});
|
|
40185
|
+
Object.defineProperty(IgxComboDropDownComponent.prototype, "lastVisibleIndex", {
|
|
40186
|
+
get: function () {
|
|
40187
|
+
return this.combo.totalItemCount ?
|
|
40188
|
+
Math.floor(this.combo.itemsMaxHeight / this.combo.itemHeight) :
|
|
40189
|
+
this.items.length - 1;
|
|
40190
|
+
},
|
|
40191
|
+
enumerable: false,
|
|
40192
|
+
configurable: true
|
|
40193
|
+
});
|
|
40194
|
+
Object.defineProperty(IgxComboDropDownComponent.prototype, "sortedChildren", {
|
|
40195
|
+
get: function () {
|
|
40196
|
+
if (this.children !== undefined) {
|
|
40197
|
+
return this.children.toArray()
|
|
40198
|
+
.sort(function (a, b) { return a.index - b.index; });
|
|
40199
|
+
}
|
|
40200
|
+
return null;
|
|
40201
|
+
},
|
|
40202
|
+
enumerable: false,
|
|
40203
|
+
configurable: true
|
|
40204
|
+
});
|
|
40205
|
+
Object.defineProperty(IgxComboDropDownComponent.prototype, "items", {
|
|
40206
|
+
/**
|
|
40207
|
+
* Get all non-header items
|
|
40208
|
+
*
|
|
40209
|
+
* ```typescript
|
|
40210
|
+
* let myDropDownItems = this.dropdown.items;
|
|
40211
|
+
* ```
|
|
40212
|
+
*/
|
|
40213
|
+
get: function () {
|
|
40214
|
+
var e_1, _a;
|
|
40215
|
+
var items = [];
|
|
40216
|
+
if (this.children !== undefined) {
|
|
40217
|
+
var sortedChildren = this.sortedChildren;
|
|
40218
|
+
try {
|
|
40219
|
+
for (var sortedChildren_1 = __values(sortedChildren), sortedChildren_1_1 = sortedChildren_1.next(); !sortedChildren_1_1.done; sortedChildren_1_1 = sortedChildren_1.next()) {
|
|
40220
|
+
var child = sortedChildren_1_1.value;
|
|
40221
|
+
if (!child.isHeader) {
|
|
40222
|
+
items.push(child);
|
|
40223
|
+
}
|
|
40224
|
+
}
|
|
40225
|
+
}
|
|
40226
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
40227
|
+
finally {
|
|
40228
|
+
try {
|
|
40229
|
+
if (sortedChildren_1_1 && !sortedChildren_1_1.done && (_a = sortedChildren_1.return)) _a.call(sortedChildren_1);
|
|
40230
|
+
}
|
|
40231
|
+
finally { if (e_1) throw e_1.error; }
|
|
40232
|
+
}
|
|
40233
|
+
}
|
|
40234
|
+
return items;
|
|
40235
|
+
},
|
|
40236
|
+
enumerable: false,
|
|
40237
|
+
configurable: true
|
|
40238
|
+
});
|
|
40325
40239
|
/**
|
|
40326
40240
|
* @hidden @internal
|
|
40327
40241
|
*/
|
|
40328
|
-
|
|
40329
|
-
|
|
40330
|
-
this.filteredData = __spreadArray([], __read(this.data));
|
|
40331
|
-
if (this.ngControl) {
|
|
40332
|
-
this.ngControl.statusChanges.pipe(operators.takeUntil(this.destroy$)).subscribe(this.onStatusChanged);
|
|
40333
|
-
this.manageRequiredAsterisk();
|
|
40334
|
-
this.cdr.detectChanges();
|
|
40335
|
-
}
|
|
40336
|
-
this.virtDir.chunkPreload.pipe(operators.takeUntil(this.destroy$)).subscribe(function (e) {
|
|
40337
|
-
var eventArgs = Object.assign({}, e, { owner: _this });
|
|
40338
|
-
_this.dataPreLoad.emit(eventArgs);
|
|
40339
|
-
});
|
|
40242
|
+
IgxComboDropDownComponent.prototype.onFocus = function () {
|
|
40243
|
+
this.focusedItem = this._focusedItem || this.items[0];
|
|
40340
40244
|
};
|
|
40341
40245
|
/**
|
|
40342
40246
|
* @hidden @internal
|
|
40343
40247
|
*/
|
|
40344
|
-
|
|
40345
|
-
this.
|
|
40346
|
-
this.destroy$.complete();
|
|
40347
|
-
this.comboAPI.clear();
|
|
40348
|
-
this.selection.clear(this.id);
|
|
40248
|
+
IgxComboDropDownComponent.prototype.onBlur = function (_evt) {
|
|
40249
|
+
this.focusedItem = null;
|
|
40349
40250
|
};
|
|
40350
40251
|
/**
|
|
40351
40252
|
* @hidden @internal
|
|
40352
40253
|
*/
|
|
40353
|
-
|
|
40354
|
-
|
|
40355
|
-
|
|
40356
|
-
|
|
40357
|
-
|
|
40358
|
-
|
|
40254
|
+
IgxComboDropDownComponent.prototype.onToggleOpened = function () {
|
|
40255
|
+
this.opened.emit();
|
|
40256
|
+
};
|
|
40257
|
+
/**
|
|
40258
|
+
* @hidden
|
|
40259
|
+
*/
|
|
40260
|
+
IgxComboDropDownComponent.prototype.navigateFirst = function () {
|
|
40261
|
+
this.navigateItem(this.virtDir.igxForOf.findIndex(function (e) { return !e.isHeader; }));
|
|
40262
|
+
};
|
|
40263
|
+
/**
|
|
40264
|
+
* @hidden
|
|
40265
|
+
*/
|
|
40266
|
+
IgxComboDropDownComponent.prototype.navigatePrev = function () {
|
|
40267
|
+
if (this._focusedItem && this._focusedItem.index === 0 && this.virtDir.state.startIndex === 0) {
|
|
40268
|
+
this.combo.focusSearchInput(false);
|
|
40269
|
+
}
|
|
40270
|
+
else {
|
|
40271
|
+
_super.prototype.navigatePrev.call(this);
|
|
40272
|
+
}
|
|
40273
|
+
};
|
|
40274
|
+
/**
|
|
40275
|
+
* @hidden
|
|
40276
|
+
*/
|
|
40277
|
+
IgxComboDropDownComponent.prototype.navigateNext = function () {
|
|
40278
|
+
var lastIndex = this.combo.totalItemCount ? this.combo.totalItemCount - 1 : this.virtDir.igxForOf.length - 1;
|
|
40279
|
+
if (this._focusedItem && this._focusedItem.index === lastIndex) {
|
|
40280
|
+
this.focusAddItemButton();
|
|
40281
|
+
}
|
|
40282
|
+
else {
|
|
40283
|
+
_super.prototype.navigateNext.call(this);
|
|
40284
|
+
}
|
|
40359
40285
|
};
|
|
40360
40286
|
/**
|
|
40361
40287
|
* @hidden @internal
|
|
40362
40288
|
*/
|
|
40363
|
-
|
|
40364
|
-
|
|
40289
|
+
IgxComboDropDownComponent.prototype.selectItem = function (item) {
|
|
40290
|
+
if (item === null || item === undefined) {
|
|
40291
|
+
return;
|
|
40292
|
+
}
|
|
40293
|
+
this.comboAPI.set_selected_item(item.itemID);
|
|
40294
|
+
this._focusedItem = item;
|
|
40365
40295
|
};
|
|
40366
40296
|
/**
|
|
40367
40297
|
* @hidden @internal
|
|
40368
40298
|
*/
|
|
40369
|
-
|
|
40370
|
-
this.
|
|
40299
|
+
IgxComboDropDownComponent.prototype.updateScrollPosition = function () {
|
|
40300
|
+
this.virtDir.getScroll().scrollTop = this._scrollPosition;
|
|
40371
40301
|
};
|
|
40372
40302
|
/**
|
|
40373
40303
|
* @hidden @internal
|
|
40374
40304
|
*/
|
|
40375
|
-
|
|
40376
|
-
|
|
40305
|
+
IgxComboDropDownComponent.prototype.onItemActionKey = function (key) {
|
|
40306
|
+
switch (key) {
|
|
40307
|
+
case DropDownActionKey.ENTER:
|
|
40308
|
+
this.handleEnter();
|
|
40309
|
+
break;
|
|
40310
|
+
case DropDownActionKey.SPACE:
|
|
40311
|
+
this.handleSpace();
|
|
40312
|
+
break;
|
|
40313
|
+
case DropDownActionKey.ESCAPE:
|
|
40314
|
+
this.close();
|
|
40315
|
+
}
|
|
40316
|
+
};
|
|
40317
|
+
IgxComboDropDownComponent.prototype.ngAfterViewInit = function () {
|
|
40318
|
+
this.virtDir.getScroll().addEventListener('scroll', this.scrollHandler);
|
|
40377
40319
|
};
|
|
40378
40320
|
/**
|
|
40379
|
-
* @hidden
|
|
40321
|
+
* @hidden @internal
|
|
40380
40322
|
*/
|
|
40381
|
-
|
|
40382
|
-
|
|
40323
|
+
IgxComboDropDownComponent.prototype.ngOnDestroy = function () {
|
|
40324
|
+
this.virtDir.getScroll().removeEventListener('scroll', this.scrollHandler);
|
|
40325
|
+
this.destroy$.next(true);
|
|
40326
|
+
this.destroy$.complete();
|
|
40327
|
+
};
|
|
40328
|
+
IgxComboDropDownComponent.prototype.scrollToHiddenItem = function (_newItem) { };
|
|
40329
|
+
IgxComboDropDownComponent.prototype.handleEnter = function () {
|
|
40330
|
+
if (this.isAddItemFocused()) {
|
|
40331
|
+
this.combo.addItemToCollection();
|
|
40332
|
+
return;
|
|
40333
|
+
}
|
|
40334
|
+
if (this.singleMode && this.focusedItem) {
|
|
40335
|
+
this.combo.select(this.focusedItem.itemID);
|
|
40336
|
+
}
|
|
40337
|
+
this.close();
|
|
40338
|
+
};
|
|
40339
|
+
IgxComboDropDownComponent.prototype.handleSpace = function () {
|
|
40340
|
+
if (this.isAddItemFocused()) {
|
|
40341
|
+
return;
|
|
40342
|
+
}
|
|
40343
|
+
else {
|
|
40344
|
+
this.selectItem(this.focusedItem);
|
|
40345
|
+
}
|
|
40346
|
+
};
|
|
40347
|
+
IgxComboDropDownComponent.prototype.isAddItemFocused = function () {
|
|
40348
|
+
return this.focusedItem instanceof IgxComboAddItemComponent;
|
|
40349
|
+
};
|
|
40350
|
+
IgxComboDropDownComponent.prototype.focusAddItemButton = function () {
|
|
40351
|
+
if (this.combo.isAddButtonVisible()) {
|
|
40352
|
+
this.focusedItem = this.items[this.items.length - 1];
|
|
40353
|
+
}
|
|
40354
|
+
};
|
|
40355
|
+
return IgxComboDropDownComponent;
|
|
40356
|
+
}(IgxDropDownComponent));
|
|
40357
|
+
IgxComboDropDownComponent.decorators = [
|
|
40358
|
+
{ type: i0.Component, args: [{
|
|
40359
|
+
selector: 'igx-combo-drop-down',
|
|
40360
|
+
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",
|
|
40361
|
+
providers: [{ provide: IGX_DROPDOWN_BASE, useExisting: IgxComboDropDownComponent }]
|
|
40362
|
+
},] }
|
|
40363
|
+
];
|
|
40364
|
+
IgxComboDropDownComponent.ctorParameters = function () { return [
|
|
40365
|
+
{ type: i0.ElementRef },
|
|
40366
|
+
{ type: i0.ChangeDetectorRef },
|
|
40367
|
+
{ type: PlatformUtil },
|
|
40368
|
+
{ type: IgxSelectionAPIService },
|
|
40369
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [IGX_COMBO_COMPONENT,] }] },
|
|
40370
|
+
{ type: IgxComboAPIService },
|
|
40371
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [DisplayDensityToken,] }] }
|
|
40372
|
+
]; };
|
|
40373
|
+
IgxComboDropDownComponent.propDecorators = {
|
|
40374
|
+
singleMode: [{ type: i0.Input }],
|
|
40375
|
+
children: [{ type: i0.ContentChildren, args: [IgxComboItemComponent, { descendants: true },] }]
|
|
40376
|
+
};
|
|
40377
|
+
|
|
40378
|
+
/**
|
|
40379
|
+
* @hidden
|
|
40380
|
+
*/
|
|
40381
|
+
var IgxComboFilteringPipe = /** @class */ (function () {
|
|
40382
|
+
function IgxComboFilteringPipe() {
|
|
40383
|
+
}
|
|
40384
|
+
IgxComboFilteringPipe.prototype.transform = function (collection, searchValue, displayKey, filteringOptions, shouldFilter) {
|
|
40385
|
+
if (shouldFilter === void 0) { shouldFilter = false; }
|
|
40386
|
+
if (!collection) {
|
|
40387
|
+
return [];
|
|
40388
|
+
}
|
|
40389
|
+
if (!searchValue || !shouldFilter) {
|
|
40390
|
+
return collection;
|
|
40391
|
+
}
|
|
40392
|
+
else {
|
|
40393
|
+
var searchTerm_1 = filteringOptions.caseSensitive ? searchValue.trim() : searchValue.toLowerCase().trim();
|
|
40394
|
+
if (displayKey != null) {
|
|
40395
|
+
return collection.filter(function (e) { return filteringOptions.caseSensitive ? e[displayKey].includes(searchTerm_1) :
|
|
40396
|
+
e[displayKey].toString().toLowerCase().includes(searchTerm_1); });
|
|
40397
|
+
}
|
|
40398
|
+
else {
|
|
40399
|
+
return collection.filter(function (e) { return filteringOptions.caseSensitive ? e.includes(searchTerm_1) :
|
|
40400
|
+
e.toString().toLowerCase().includes(searchTerm_1); });
|
|
40401
|
+
}
|
|
40402
|
+
}
|
|
40403
|
+
};
|
|
40404
|
+
return IgxComboFilteringPipe;
|
|
40405
|
+
}());
|
|
40406
|
+
IgxComboFilteringPipe.decorators = [
|
|
40407
|
+
{ type: i0.Pipe, args: [{
|
|
40408
|
+
name: 'comboFiltering'
|
|
40409
|
+
},] }
|
|
40410
|
+
];
|
|
40411
|
+
/**
|
|
40412
|
+
* @hidden
|
|
40413
|
+
*/
|
|
40414
|
+
var IgxComboGroupingPipe = /** @class */ (function () {
|
|
40415
|
+
function IgxComboGroupingPipe(combo) {
|
|
40416
|
+
this.combo = combo;
|
|
40417
|
+
}
|
|
40418
|
+
IgxComboGroupingPipe.prototype.transform = function (collection, groupKey, valueKey) {
|
|
40419
|
+
var _a;
|
|
40420
|
+
this.combo.filteredData = collection;
|
|
40421
|
+
if ((!groupKey && groupKey !== 0) || !collection.length) {
|
|
40422
|
+
return collection;
|
|
40423
|
+
}
|
|
40424
|
+
var sorted = DataUtil.sort(cloneArray(collection), [{
|
|
40425
|
+
fieldName: groupKey,
|
|
40426
|
+
dir: exports.SortingDirection.Asc,
|
|
40427
|
+
ignoreCase: true,
|
|
40428
|
+
strategy: DefaultSortingStrategy.instance()
|
|
40429
|
+
}]);
|
|
40430
|
+
var data = cloneArray(sorted);
|
|
40431
|
+
var inserts = 0;
|
|
40432
|
+
var currentHeader = null;
|
|
40433
|
+
for (var i = 0; i < sorted.length; i++) {
|
|
40434
|
+
var insertFlag = 0;
|
|
40435
|
+
if (currentHeader !== sorted[i][groupKey]) {
|
|
40436
|
+
currentHeader = sorted[i][groupKey];
|
|
40437
|
+
insertFlag = 1;
|
|
40438
|
+
}
|
|
40439
|
+
if (insertFlag) {
|
|
40440
|
+
data.splice(i + inserts, 0, (_a = {},
|
|
40441
|
+
_a[valueKey] = currentHeader,
|
|
40442
|
+
_a[groupKey] = currentHeader,
|
|
40443
|
+
_a.isHeader = true,
|
|
40444
|
+
_a));
|
|
40445
|
+
inserts++;
|
|
40446
|
+
}
|
|
40447
|
+
}
|
|
40448
|
+
return data;
|
|
40383
40449
|
};
|
|
40384
|
-
|
|
40450
|
+
return IgxComboGroupingPipe;
|
|
40451
|
+
}());
|
|
40452
|
+
IgxComboGroupingPipe.decorators = [
|
|
40453
|
+
{ type: i0.Pipe, args: [{
|
|
40454
|
+
name: 'comboGrouping'
|
|
40455
|
+
},] }
|
|
40456
|
+
];
|
|
40457
|
+
IgxComboGroupingPipe.ctorParameters = function () { return [
|
|
40458
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [IGX_COMBO_COMPONENT,] }] }
|
|
40459
|
+
]; };
|
|
40460
|
+
|
|
40461
|
+
/**
|
|
40462
|
+
* When called with sets A & B, returns A - B (as array);
|
|
40463
|
+
*
|
|
40464
|
+
* @hidden
|
|
40465
|
+
*/
|
|
40466
|
+
var diffInSets = function (set1, set2) {
|
|
40467
|
+
var results = [];
|
|
40468
|
+
set1.forEach(function (entry) {
|
|
40469
|
+
if (!set2.has(entry)) {
|
|
40470
|
+
results.push(entry);
|
|
40471
|
+
}
|
|
40472
|
+
});
|
|
40473
|
+
return results;
|
|
40474
|
+
};
|
|
40475
|
+
var ɵ0$1 = diffInSets;
|
|
40476
|
+
/**
|
|
40477
|
+
* Represents a drop-down list that provides editable functionalities, allowing users to choose an option from a predefined list.
|
|
40478
|
+
*
|
|
40479
|
+
* @igxModule IgxComboModule
|
|
40480
|
+
* @igxTheme igx-combo-theme
|
|
40481
|
+
* @igxKeywords combobox, combo selection
|
|
40482
|
+
* @igxGroup Grids & Lists
|
|
40483
|
+
*
|
|
40484
|
+
* @remarks
|
|
40485
|
+
* It provides the ability to filter items as well as perform selection with the provided data.
|
|
40486
|
+
* Additionally, it exposes keyboard navigation and custom styling capabilities.
|
|
40487
|
+
* @example
|
|
40488
|
+
* ```html
|
|
40489
|
+
* <igx-combo [itemsMaxHeight]="250" [data]="locationData"
|
|
40490
|
+
* [displayKey]="'field'" [valueKey]="'field'"
|
|
40491
|
+
* placeholder="Location(s)" searchPlaceholder="Search...">
|
|
40492
|
+
* </igx-combo>
|
|
40493
|
+
* ```
|
|
40494
|
+
*/
|
|
40495
|
+
var IgxComboComponent = /** @class */ (function (_super) {
|
|
40496
|
+
__extends(IgxComboComponent, _super);
|
|
40497
|
+
function IgxComboComponent(elementRef, cdr, selectionService, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector) {
|
|
40498
|
+
var _this = _super.call(this, elementRef, cdr, selectionService, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector) || this;
|
|
40499
|
+
_this.elementRef = elementRef;
|
|
40500
|
+
_this.cdr = cdr;
|
|
40501
|
+
_this.selectionService = selectionService;
|
|
40502
|
+
_this.comboAPI = comboAPI;
|
|
40503
|
+
_this._iconService = _iconService;
|
|
40504
|
+
_this._displayDensityOptions = _displayDensityOptions;
|
|
40505
|
+
_this._inputGroupType = _inputGroupType;
|
|
40506
|
+
_this._injector = _injector;
|
|
40507
|
+
/**
|
|
40508
|
+
* An @Input property that controls whether the combo's search box
|
|
40509
|
+
* should be focused after the `opened` event is called
|
|
40510
|
+
* When `false`, the combo's list item container will be focused instead
|
|
40511
|
+
*/
|
|
40512
|
+
_this.autoFocusSearch = true;
|
|
40513
|
+
/**
|
|
40514
|
+
* An @Input property that enabled/disables filtering in the list. The default is `true`.
|
|
40515
|
+
* ```html
|
|
40516
|
+
* <igx-combo [filterable]="false">
|
|
40517
|
+
* ```
|
|
40518
|
+
*/
|
|
40519
|
+
_this.filterable = true;
|
|
40520
|
+
/**
|
|
40521
|
+
* Defines the placeholder value for the combo dropdown search field
|
|
40522
|
+
*
|
|
40523
|
+
* ```typescript
|
|
40524
|
+
* // get
|
|
40525
|
+
* let myComboSearchPlaceholder = this.combo.searchPlaceholder;
|
|
40526
|
+
* ```
|
|
40527
|
+
*
|
|
40528
|
+
* ```html
|
|
40529
|
+
* <!--set-->
|
|
40530
|
+
* <igx-combo [searchPlaceholder]='newPlaceHolder'></igx-combo>
|
|
40531
|
+
* ```
|
|
40532
|
+
*/
|
|
40533
|
+
_this.searchPlaceholder = 'Enter a Search Term';
|
|
40534
|
+
/**
|
|
40535
|
+
* Emitted when item selection is changing, before the selection completes
|
|
40536
|
+
*
|
|
40537
|
+
* ```html
|
|
40538
|
+
* <igx-combo (selectionChanging)='handleSelection()'></igx-combo>
|
|
40539
|
+
* ```
|
|
40540
|
+
*/
|
|
40541
|
+
_this.selectionChanging = new i0.EventEmitter();
|
|
40542
|
+
/**
|
|
40543
|
+
* @hidden @internal
|
|
40544
|
+
*/
|
|
40545
|
+
_this.filteringLogic = exports.FilteringLogic.Or;
|
|
40546
|
+
_this.stringFilters = IgxStringFilteringOperand;
|
|
40547
|
+
_this.booleanFilters = IgxBooleanFilteringOperand;
|
|
40548
|
+
_this._prevInputValue = '';
|
|
40549
|
+
_this.comboAPI.register(_this);
|
|
40550
|
+
return _this;
|
|
40551
|
+
}
|
|
40552
|
+
Object.defineProperty(IgxComboComponent.prototype, "inputEmpty", {
|
|
40385
40553
|
/**
|
|
40386
40554
|
* @hidden @internal
|
|
40387
40555
|
*/
|
|
40388
40556
|
get: function () {
|
|
40389
|
-
this.
|
|
40390
|
-
if (this.itemTemplate) {
|
|
40391
|
-
return this.itemTemplate;
|
|
40392
|
-
}
|
|
40393
|
-
if (this._dataType === DataTypes.COMPLEX) {
|
|
40394
|
-
return this.complexTemplate;
|
|
40395
|
-
}
|
|
40396
|
-
return this.primitiveTemplate;
|
|
40557
|
+
return !this.value && !this.placeholder;
|
|
40397
40558
|
},
|
|
40398
40559
|
enumerable: false,
|
|
40399
40560
|
configurable: true
|
|
40400
40561
|
});
|
|
40401
|
-
Object.defineProperty(IgxComboComponent.prototype, "
|
|
40402
|
-
/**
|
|
40403
|
-
* @hidden @internal
|
|
40404
|
-
*/
|
|
40562
|
+
Object.defineProperty(IgxComboComponent.prototype, "filteredData", {
|
|
40563
|
+
/** @hidden @internal */
|
|
40405
40564
|
get: function () {
|
|
40406
|
-
return
|
|
40407
|
-
|
|
40408
|
-
|
|
40565
|
+
return this.filterable ? this._filteredData : this.data;
|
|
40566
|
+
},
|
|
40567
|
+
/** @hidden @internal */
|
|
40568
|
+
set: function (val) {
|
|
40569
|
+
this._filteredData = this.groupKey ? (val || []).filter(function (e) { return e.isHeader !== true; }) : val;
|
|
40570
|
+
this.checkMatch();
|
|
40571
|
+
},
|
|
40572
|
+
enumerable: false,
|
|
40573
|
+
configurable: true
|
|
40574
|
+
});
|
|
40575
|
+
Object.defineProperty(IgxComboComponent.prototype, "displaySearchInput", {
|
|
40576
|
+
/** @hidden @internal */
|
|
40577
|
+
get: function () {
|
|
40578
|
+
return this.filterable || this.allowCustomValues;
|
|
40409
40579
|
},
|
|
40410
40580
|
enumerable: false,
|
|
40411
40581
|
configurable: true
|
|
@@ -40413,79 +40583,70 @@
|
|
|
40413
40583
|
/**
|
|
40414
40584
|
* @hidden @internal
|
|
40415
40585
|
*/
|
|
40416
|
-
IgxComboComponent.prototype.
|
|
40417
|
-
|
|
40418
|
-
|
|
40419
|
-
|
|
40420
|
-
|
|
40421
|
-
if (this.collapsed) {
|
|
40422
|
-
this.getEditElement().focus();
|
|
40586
|
+
IgxComboComponent.prototype.handleKeyUp = function (event) {
|
|
40587
|
+
// TODO: use PlatformUtil for keyboard navigation
|
|
40588
|
+
if (event.key === 'ArrowDown' || event.key === 'Down') {
|
|
40589
|
+
this.dropdown.focusedItem = this.dropdown.items[0];
|
|
40590
|
+
this.dropdownContainer.nativeElement.focus();
|
|
40423
40591
|
}
|
|
40424
|
-
else {
|
|
40425
|
-
this.
|
|
40592
|
+
else if (event.key === 'Escape' || event.key === 'Esc') {
|
|
40593
|
+
this.toggle();
|
|
40426
40594
|
}
|
|
40427
|
-
event.stopPropagation();
|
|
40428
40595
|
};
|
|
40429
40596
|
/**
|
|
40430
|
-
*
|
|
40431
|
-
*
|
|
40432
|
-
* ```html
|
|
40433
|
-
* <button (click)="combo.toggle()">Toggle Combo</button>
|
|
40434
|
-
* <igx-combo #combo></igx-combo>
|
|
40435
|
-
* ```
|
|
40597
|
+
* @hidden @internal
|
|
40436
40598
|
*/
|
|
40437
|
-
IgxComboComponent.prototype.
|
|
40438
|
-
|
|
40439
|
-
|
|
40599
|
+
IgxComboComponent.prototype.handleSelectAll = function (evt) {
|
|
40600
|
+
if (evt.checked) {
|
|
40601
|
+
this.selectAllItems();
|
|
40602
|
+
}
|
|
40603
|
+
else {
|
|
40604
|
+
this.deselectAllItems();
|
|
40605
|
+
}
|
|
40440
40606
|
};
|
|
40441
40607
|
/**
|
|
40442
|
-
*
|
|
40443
|
-
*
|
|
40444
|
-
* ```html
|
|
40445
|
-
* <button (click)="combo.open()">Open Combo</button>
|
|
40446
|
-
* <igx-combo #combo></igx-combo>
|
|
40447
|
-
* ```
|
|
40608
|
+
* @hidden @internal
|
|
40448
40609
|
*/
|
|
40449
|
-
IgxComboComponent.prototype.
|
|
40450
|
-
var
|
|
40451
|
-
this.
|
|
40610
|
+
IgxComboComponent.prototype.writeValue = function (value) {
|
|
40611
|
+
var selection = Array.isArray(value) ? value : [];
|
|
40612
|
+
var oldSelection = this.selection;
|
|
40613
|
+
this.selectionService.select_items(this.id, selection, true);
|
|
40614
|
+
this.cdr.markForCheck();
|
|
40615
|
+
this._value = this.createDisplayText(this.selection, oldSelection);
|
|
40452
40616
|
};
|
|
40453
40617
|
/**
|
|
40454
|
-
*
|
|
40455
|
-
*
|
|
40456
|
-
* ```html
|
|
40457
|
-
* <button (click)="combo.close()">Close Combo</button>
|
|
40458
|
-
* <igx-combo #combo></igx-combo>
|
|
40459
|
-
* ```
|
|
40618
|
+
* @hidden
|
|
40460
40619
|
*/
|
|
40461
|
-
IgxComboComponent.prototype.
|
|
40462
|
-
this.
|
|
40620
|
+
IgxComboComponent.prototype.getEditElement = function () {
|
|
40621
|
+
return this.comboInput.nativeElement;
|
|
40463
40622
|
};
|
|
40464
|
-
Object.defineProperty(IgxComboComponent.prototype, "
|
|
40623
|
+
Object.defineProperty(IgxComboComponent.prototype, "context", {
|
|
40465
40624
|
/**
|
|
40466
|
-
*
|
|
40467
|
-
*
|
|
40468
|
-
* ```typescript
|
|
40469
|
-
* let state = this.combo.collapsed;
|
|
40470
|
-
* ```
|
|
40625
|
+
* @hidden @internal
|
|
40471
40626
|
*/
|
|
40472
40627
|
get: function () {
|
|
40473
|
-
return
|
|
40628
|
+
return {
|
|
40629
|
+
$implicit: this
|
|
40630
|
+
};
|
|
40474
40631
|
},
|
|
40475
40632
|
enumerable: false,
|
|
40476
40633
|
configurable: true
|
|
40477
40634
|
});
|
|
40478
40635
|
/**
|
|
40479
|
-
*
|
|
40480
|
-
*
|
|
40481
|
-
* @returns Array of selected items
|
|
40482
|
-
* ```typescript
|
|
40483
|
-
* let selectedItems = this.combo.selectedItems();
|
|
40484
|
-
* ```
|
|
40636
|
+
* @hidden @internal
|
|
40485
40637
|
*/
|
|
40486
|
-
IgxComboComponent.prototype.
|
|
40487
|
-
|
|
40488
|
-
|
|
40638
|
+
IgxComboComponent.prototype.handleClearItems = function (event) {
|
|
40639
|
+
if (this.disabled) {
|
|
40640
|
+
return;
|
|
40641
|
+
}
|
|
40642
|
+
this.deselectAllItems(true, event);
|
|
40643
|
+
if (this.collapsed) {
|
|
40644
|
+
this.getEditElement().focus();
|
|
40645
|
+
}
|
|
40646
|
+
else {
|
|
40647
|
+
this.focusSearchInput(true);
|
|
40648
|
+
}
|
|
40649
|
+
event.stopPropagation();
|
|
40489
40650
|
};
|
|
40490
40651
|
/**
|
|
40491
40652
|
* Select defined items
|
|
@@ -40493,12 +40654,12 @@
|
|
|
40493
40654
|
* @param newItems new items to be selected
|
|
40494
40655
|
* @param clearCurrentSelection if true clear previous selected items
|
|
40495
40656
|
* ```typescript
|
|
40496
|
-
* this.combo.
|
|
40657
|
+
* this.combo.select(["New York", "New Jersey"]);
|
|
40497
40658
|
* ```
|
|
40498
40659
|
*/
|
|
40499
|
-
IgxComboComponent.prototype.
|
|
40660
|
+
IgxComboComponent.prototype.select = function (newItems, clearCurrentSelection, event) {
|
|
40500
40661
|
if (newItems) {
|
|
40501
|
-
var newSelection = this.
|
|
40662
|
+
var newSelection = this.selectionService.add_items(this.id, newItems, clearCurrentSelection);
|
|
40502
40663
|
this.setSelection(newSelection, event);
|
|
40503
40664
|
}
|
|
40504
40665
|
};
|
|
@@ -40507,12 +40668,12 @@
|
|
|
40507
40668
|
*
|
|
40508
40669
|
* @param items items to deselected
|
|
40509
40670
|
* ```typescript
|
|
40510
|
-
* this.combo.
|
|
40671
|
+
* this.combo.deselect(["New York", "New Jersey"]);
|
|
40511
40672
|
* ```
|
|
40512
40673
|
*/
|
|
40513
|
-
IgxComboComponent.prototype.
|
|
40674
|
+
IgxComboComponent.prototype.deselect = function (items, event) {
|
|
40514
40675
|
if (items) {
|
|
40515
|
-
var newSelection = this.
|
|
40676
|
+
var newSelection = this.selectionService.delete_items(this.id, items);
|
|
40516
40677
|
this.setSelection(newSelection, event);
|
|
40517
40678
|
}
|
|
40518
40679
|
};
|
|
@@ -40525,8 +40686,8 @@
|
|
|
40525
40686
|
* ```
|
|
40526
40687
|
*/
|
|
40527
40688
|
IgxComboComponent.prototype.selectAllItems = function (ignoreFilter, event) {
|
|
40528
|
-
var allVisible = this.
|
|
40529
|
-
var newSelection = this.
|
|
40689
|
+
var allVisible = this.selectionService.get_all_ids(ignoreFilter ? this.data : this.filteredData, this.valueKey);
|
|
40690
|
+
var newSelection = this.selectionService.add_items(this.id, allVisible);
|
|
40530
40691
|
this.setSelection(newSelection, event);
|
|
40531
40692
|
};
|
|
40532
40693
|
/**
|
|
@@ -40538,9 +40699,9 @@
|
|
|
40538
40699
|
* ```
|
|
40539
40700
|
*/
|
|
40540
40701
|
IgxComboComponent.prototype.deselectAllItems = function (ignoreFilter, event) {
|
|
40541
|
-
var newSelection = this.
|
|
40702
|
+
var newSelection = this.selectionService.get_empty();
|
|
40542
40703
|
if (this.filteredData.length !== this.data.length && !ignoreFilter) {
|
|
40543
|
-
newSelection = this.
|
|
40704
|
+
newSelection = this.selectionService.delete_items(this.id, this.selectionService.get_all_ids(this.filteredData, this.valueKey));
|
|
40544
40705
|
}
|
|
40545
40706
|
this.setSelection(newSelection, event);
|
|
40546
40707
|
};
|
|
@@ -40569,26 +40730,13 @@
|
|
|
40569
40730
|
return;
|
|
40570
40731
|
}
|
|
40571
40732
|
if (select) {
|
|
40572
|
-
this.
|
|
40733
|
+
this.select([itemID], false, event);
|
|
40573
40734
|
}
|
|
40574
40735
|
else {
|
|
40575
|
-
this.
|
|
40736
|
+
this.deselect([itemID], event);
|
|
40576
40737
|
}
|
|
40577
40738
|
};
|
|
40578
|
-
/**
|
|
40579
|
-
* Event handlers
|
|
40580
|
-
*
|
|
40581
|
-
* @hidden
|
|
40582
|
-
* @internal
|
|
40583
|
-
*/
|
|
40584
|
-
IgxComboComponent.prototype.handleOpening = function (e) {
|
|
40585
|
-
var args = { owner: this, event: e.event, cancel: e.cancel };
|
|
40586
|
-
this.opening.emit(args);
|
|
40587
|
-
e.cancel = args.cancel;
|
|
40588
|
-
};
|
|
40589
|
-
/**
|
|
40590
|
-
* @hidden @internal
|
|
40591
|
-
*/
|
|
40739
|
+
/** @hidden @internal */
|
|
40592
40740
|
IgxComboComponent.prototype.handleOpened = function () {
|
|
40593
40741
|
this.triggerCheck();
|
|
40594
40742
|
// Disabling focus of the search input should happen only when drop down opens.
|
|
@@ -40602,36 +40750,26 @@
|
|
|
40602
40750
|
}
|
|
40603
40751
|
this.opened.emit({ owner: this });
|
|
40604
40752
|
};
|
|
40605
|
-
/**
|
|
40606
|
-
|
|
40607
|
-
|
|
40608
|
-
|
|
40609
|
-
|
|
40610
|
-
|
|
40611
|
-
|
|
40612
|
-
|
|
40613
|
-
|
|
40753
|
+
/** @hidden @internal */
|
|
40754
|
+
IgxComboComponent.prototype.focusSearchInput = function (opening) {
|
|
40755
|
+
if (this.displaySearchInput && this.searchInput) {
|
|
40756
|
+
this.searchInput.nativeElement.focus();
|
|
40757
|
+
}
|
|
40758
|
+
else {
|
|
40759
|
+
if (opening) {
|
|
40760
|
+
this.dropdownContainer.nativeElement.focus();
|
|
40761
|
+
}
|
|
40762
|
+
else {
|
|
40763
|
+
this.comboInput.nativeElement.focus();
|
|
40764
|
+
this.toggle();
|
|
40765
|
+
}
|
|
40614
40766
|
}
|
|
40615
|
-
this.searchValue = '';
|
|
40616
|
-
this.comboInput.nativeElement.focus();
|
|
40617
|
-
};
|
|
40618
|
-
/**
|
|
40619
|
-
* @hidden @internal
|
|
40620
|
-
*/
|
|
40621
|
-
IgxComboComponent.prototype.handleClosed = function () {
|
|
40622
|
-
this.closed.emit({ owner: this });
|
|
40623
|
-
};
|
|
40624
|
-
/**
|
|
40625
|
-
* @hidden @internal
|
|
40626
|
-
*/
|
|
40627
|
-
IgxComboComponent.prototype.toggleCaseSensitive = function () {
|
|
40628
|
-
this.filteringOptions = { caseSensitive: !this.filteringOptions.caseSensitive };
|
|
40629
40767
|
};
|
|
40630
40768
|
IgxComboComponent.prototype.setSelection = function (newSelection, event) {
|
|
40631
|
-
var removed = diffInSets(this.
|
|
40632
|
-
var added = diffInSets(newSelection, this.
|
|
40769
|
+
var removed = diffInSets(this.selectionService.get(this.id), newSelection);
|
|
40770
|
+
var added = diffInSets(newSelection, this.selectionService.get(this.id));
|
|
40633
40771
|
var newSelectionAsArray = Array.from(newSelection);
|
|
40634
|
-
var oldSelectionAsArray = Array.from(this.
|
|
40772
|
+
var oldSelectionAsArray = Array.from(this.selectionService.get(this.id) || []);
|
|
40635
40773
|
var displayText = this.createDisplayText(newSelectionAsArray, oldSelectionAsArray);
|
|
40636
40774
|
var args = {
|
|
40637
40775
|
newSelection: newSelectionAsArray,
|
|
@@ -40645,7 +40783,7 @@
|
|
|
40645
40783
|
};
|
|
40646
40784
|
this.selectionChanging.emit(args);
|
|
40647
40785
|
if (!args.cancel) {
|
|
40648
|
-
this.
|
|
40786
|
+
this.selectionService.select_items(this.id, args.newSelection, true);
|
|
40649
40787
|
if (displayText !== args.displayText) {
|
|
40650
40788
|
this._value = args.displayText;
|
|
40651
40789
|
}
|
|
@@ -40655,71 +40793,10 @@
|
|
|
40655
40793
|
this._onChangeCallback(args.newSelection);
|
|
40656
40794
|
}
|
|
40657
40795
|
};
|
|
40658
|
-
IgxComboComponent.prototype.
|
|
40659
|
-
|
|
40660
|
-
|
|
40661
|
-
|
|
40662
|
-
this.inputGroup.isRequired = error && error.required;
|
|
40663
|
-
}
|
|
40664
|
-
};
|
|
40665
|
-
/** Contains key-value pairs of the selected valueKeys and their resp. displayKeys */
|
|
40666
|
-
IgxComboComponent.prototype.registerRemoteEntries = function (ids, add) {
|
|
40667
|
-
var e_1, _a, e_2, _b;
|
|
40668
|
-
if (add === void 0) { add = true; }
|
|
40669
|
-
if (add) {
|
|
40670
|
-
var selection = this.getValueDisplayPairs(ids);
|
|
40671
|
-
try {
|
|
40672
|
-
for (var selection_1 = __values(selection), selection_1_1 = selection_1.next(); !selection_1_1.done; selection_1_1 = selection_1.next()) {
|
|
40673
|
-
var entry = selection_1_1.value;
|
|
40674
|
-
this._remoteSelection[entry[this.valueKey]] = entry[this.displayKey];
|
|
40675
|
-
}
|
|
40676
|
-
}
|
|
40677
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
40678
|
-
finally {
|
|
40679
|
-
try {
|
|
40680
|
-
if (selection_1_1 && !selection_1_1.done && (_a = selection_1.return)) _a.call(selection_1);
|
|
40681
|
-
}
|
|
40682
|
-
finally { if (e_1) throw e_1.error; }
|
|
40683
|
-
}
|
|
40684
|
-
}
|
|
40685
|
-
else {
|
|
40686
|
-
try {
|
|
40687
|
-
for (var ids_1 = __values(ids), ids_1_1 = ids_1.next(); !ids_1_1.done; ids_1_1 = ids_1.next()) {
|
|
40688
|
-
var entry = ids_1_1.value;
|
|
40689
|
-
delete this._remoteSelection[entry];
|
|
40690
|
-
}
|
|
40691
|
-
}
|
|
40692
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
40693
|
-
finally {
|
|
40694
|
-
try {
|
|
40695
|
-
if (ids_1_1 && !ids_1_1.done && (_b = ids_1.return)) _b.call(ids_1);
|
|
40696
|
-
}
|
|
40697
|
-
finally { if (e_2) throw e_2.error; }
|
|
40698
|
-
}
|
|
40699
|
-
}
|
|
40700
|
-
};
|
|
40701
|
-
/**
|
|
40702
|
-
* For `id: any[]` returns a mapped `{ [combo.valueKey]: any, [combo.displayKey]: any }[]`
|
|
40703
|
-
*/
|
|
40704
|
-
IgxComboComponent.prototype.getValueDisplayPairs = function (ids) {
|
|
40705
|
-
var _this = this;
|
|
40706
|
-
return this.data.filter(function (entry) { return ids.indexOf(entry[_this.valueKey]) > -1; }).map(function (e) {
|
|
40707
|
-
var _a;
|
|
40708
|
-
return (_a = {},
|
|
40709
|
-
_a[_this.valueKey] = e[_this.valueKey],
|
|
40710
|
-
_a[_this.displayKey] = e[_this.displayKey],
|
|
40711
|
-
_a);
|
|
40712
|
-
});
|
|
40713
|
-
};
|
|
40714
|
-
IgxComboComponent.prototype.checkMatch = function () {
|
|
40715
|
-
var _this = this;
|
|
40716
|
-
var displayKey = this.displayKey;
|
|
40717
|
-
var matchFn = function (e) {
|
|
40718
|
-
var value = displayKey ? e[displayKey] : e;
|
|
40719
|
-
return value.toString().toLowerCase() === _this.searchValue.trim().toLowerCase();
|
|
40720
|
-
};
|
|
40721
|
-
var itemMatch = this.filteredData.some(matchFn);
|
|
40722
|
-
this.customValueFlag = this.allowCustomValues && !itemMatch;
|
|
40796
|
+
IgxComboComponent.prototype.createDisplayText = function (newSelection, oldSelection) {
|
|
40797
|
+
return this.isRemote
|
|
40798
|
+
? this.getRemoteSelection(newSelection, oldSelection)
|
|
40799
|
+
: this.concatDisplayText(newSelection);
|
|
40723
40800
|
};
|
|
40724
40801
|
/** Returns a string that should be populated in the combo's text box */
|
|
40725
40802
|
IgxComboComponent.prototype.concatDisplayText = function (selection) {
|
|
@@ -40729,47 +40806,12 @@
|
|
|
40729
40806
|
selection.join(', ');
|
|
40730
40807
|
return value;
|
|
40731
40808
|
};
|
|
40732
|
-
/**
|
|
40733
|
-
* Constructs the combo display value
|
|
40734
|
-
* If remote, caches the key displayText
|
|
40735
|
-
* If not, just combine the object.displayKeys
|
|
40736
|
-
*/
|
|
40737
|
-
IgxComboComponent.prototype.createDisplayText = function (newSelection, oldSelection) {
|
|
40738
|
-
var _this = this;
|
|
40739
|
-
var value = '';
|
|
40740
|
-
if (this.isRemote) {
|
|
40741
|
-
if (newSelection.length) {
|
|
40742
|
-
var removedItems = oldSelection.filter(function (e) { return newSelection.indexOf(e) < 0; });
|
|
40743
|
-
var addedItems = newSelection.filter(function (e) { return oldSelection.indexOf(e) < 0; });
|
|
40744
|
-
this.registerRemoteEntries(addedItems);
|
|
40745
|
-
this.registerRemoteEntries(removedItems, false);
|
|
40746
|
-
value = Object.keys(this._remoteSelection).map(function (e) { return _this._remoteSelection[e]; }).join(', ');
|
|
40747
|
-
}
|
|
40748
|
-
else {
|
|
40749
|
-
// If new selection is empty, clear all items
|
|
40750
|
-
this.registerRemoteEntries(oldSelection, false);
|
|
40751
|
-
}
|
|
40752
|
-
}
|
|
40753
|
-
else {
|
|
40754
|
-
value = this.concatDisplayText(newSelection);
|
|
40755
|
-
}
|
|
40756
|
-
return value;
|
|
40757
|
-
};
|
|
40758
|
-
/** if there is a valueKey - map the keys to data items, else - just return the keys */
|
|
40759
|
-
IgxComboComponent.prototype.convertKeysToItems = function (keys) {
|
|
40760
|
-
var _this = this;
|
|
40761
|
-
if (this.comboAPI.valueKey === null) {
|
|
40762
|
-
return keys;
|
|
40763
|
-
}
|
|
40764
|
-
// map keys vs. filter data to retain the order of the selected items
|
|
40765
|
-
return keys.map(function (key) { return _this.data.find(function (entry) { return entry[_this.valueKey] === key; }); }).filter(function (e) { return e !== undefined; });
|
|
40766
|
-
};
|
|
40767
40809
|
return IgxComboComponent;
|
|
40768
|
-
}(
|
|
40810
|
+
}(IgxComboBaseDirective));
|
|
40769
40811
|
IgxComboComponent.decorators = [
|
|
40770
40812
|
{ type: i0.Component, args: [{
|
|
40771
40813
|
selector: 'igx-combo',
|
|
40772
|
-
template: "<igx-input-group #inputGroup [displayDensity]=\"displayDensity\" [type]=\"type\" (click)=\"
|
|
40814
|
+
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",
|
|
40773
40815
|
providers: [
|
|
40774
40816
|
IgxComboAPIService,
|
|
40775
40817
|
{ provide: IGX_COMBO_COMPONENT, useExisting: IgxComboComponent },
|
|
@@ -40788,56 +40830,11 @@
|
|
|
40788
40830
|
{ type: i0.Injector, decorators: [{ type: i0.Optional }] }
|
|
40789
40831
|
]; };
|
|
40790
40832
|
IgxComboComponent.propDecorators = {
|
|
40791
|
-
overlaySettings: [{ type: i0.Input }],
|
|
40792
|
-
inputGroup: [{ type: i0.ViewChild, args: ['inputGroup', { read: IgxInputGroupComponent, static: true },] }],
|
|
40793
|
-
comboInput: [{ type: i0.ViewChild, args: ['comboInput', { read: IgxInputDirective, static: true },] }],
|
|
40794
|
-
dropdown: [{ type: i0.ViewChild, args: [IgxComboDropDownComponent, { read: IgxComboDropDownComponent, static: true },] }],
|
|
40795
|
-
searchInput: [{ type: i0.ViewChild, args: ['searchInput',] }],
|
|
40796
|
-
itemTemplate: [{ type: i0.ContentChild, args: [IgxComboItemDirective, { read: i0.TemplateRef },] }],
|
|
40797
|
-
headerTemplate: [{ type: i0.ContentChild, args: [IgxComboHeaderDirective, { read: i0.TemplateRef },] }],
|
|
40798
|
-
footerTemplate: [{ type: i0.ContentChild, args: [IgxComboFooterDirective, { read: i0.TemplateRef },] }],
|
|
40799
|
-
headerItemTemplate: [{ type: i0.ContentChild, args: [IgxComboHeaderItemDirective, { read: i0.TemplateRef },] }],
|
|
40800
|
-
addItemTemplate: [{ type: i0.ContentChild, args: [IgxComboAddItemDirective, { read: i0.TemplateRef },] }],
|
|
40801
|
-
emptyTemplate: [{ type: i0.ContentChild, args: [IgxComboEmptyDirective, { read: i0.TemplateRef },] }],
|
|
40802
|
-
toggleIconTemplate: [{ type: i0.ContentChild, args: [IgxComboToggleIconDirective, { read: i0.TemplateRef },] }],
|
|
40803
|
-
clearIconTemplate: [{ type: i0.ContentChild, args: [IgxComboClearIconDirective, { read: i0.TemplateRef },] }],
|
|
40804
|
-
virtualScrollContainer: [{ type: i0.ViewChild, args: [IgxForOfDirective, { static: true },] }],
|
|
40805
|
-
selectionChanging: [{ type: i0.Output }],
|
|
40806
|
-
opening: [{ type: i0.Output }],
|
|
40807
|
-
opened: [{ type: i0.Output }],
|
|
40808
|
-
closing: [{ type: i0.Output }],
|
|
40809
|
-
closed: [{ type: i0.Output }],
|
|
40810
|
-
addition: [{ type: i0.Output }],
|
|
40811
|
-
searchInputUpdate: [{ type: i0.Output }],
|
|
40812
|
-
dataPreLoad: [{ type: i0.Output }],
|
|
40813
|
-
id: [{ type: i0.HostBinding, args: ['attr.id',] }, { type: i0.Input }],
|
|
40814
|
-
width: [{ type: i0.HostBinding, args: ['style.width',] }, { type: i0.Input }],
|
|
40815
|
-
cssClass: [{ type: i0.HostBinding, args: ['class.igx-combo',] }],
|
|
40816
|
-
role: [{ type: i0.HostBinding, args: ["attr.role",] }],
|
|
40817
|
-
ariaExpanded: [{ type: i0.HostBinding, args: ['attr.aria-expanded',] }],
|
|
40818
|
-
hasPopUp: [{ type: i0.HostBinding, args: ['attr.aria-haspopup',] }],
|
|
40819
|
-
ariaOwns: [{ type: i0.HostBinding, args: ['attr.aria-owns',] }],
|
|
40820
|
-
allowCustomValues: [{ type: i0.Input }],
|
|
40821
|
-
itemsMaxHeight: [{ type: i0.Input }],
|
|
40822
|
-
itemsWidth: [{ type: i0.Input }],
|
|
40823
|
-
itemHeight: [{ type: i0.Input }],
|
|
40824
|
-
placeholder: [{ type: i0.Input }],
|
|
40825
|
-
searchPlaceholder: [{ type: i0.Input }],
|
|
40826
|
-
showSearchCaseIcon: [{ type: i0.Input }],
|
|
40827
|
-
data: [{ type: i0.Input }],
|
|
40828
|
-
valueKey: [{ type: i0.Input }],
|
|
40829
|
-
displayKey: [{ type: i0.Input }],
|
|
40830
|
-
groupKey: [{ type: i0.Input }],
|
|
40831
|
-
filterable: [{ type: i0.Input }],
|
|
40832
|
-
ariaLabelledBy: [{ type: i0.Input }, { type: i0.HostBinding, args: ['attr.aria-labelledby',] }],
|
|
40833
|
-
disabled: [{ type: i0.Input }],
|
|
40834
|
-
type: [{ type: i0.Input }],
|
|
40835
40833
|
autoFocusSearch: [{ type: i0.Input }],
|
|
40836
|
-
|
|
40837
|
-
|
|
40838
|
-
|
|
40839
|
-
|
|
40840
|
-
onArrowDown: [{ type: i0.HostListener, args: ['keydown.ArrowDown', ['$event'],] }, { type: i0.HostListener, args: ['keydown.Alt.ArrowDown', ['$event'],] }]
|
|
40834
|
+
filterable: [{ type: i0.Input }],
|
|
40835
|
+
searchPlaceholder: [{ type: i0.Input }],
|
|
40836
|
+
selectionChanging: [{ type: i0.Output }],
|
|
40837
|
+
dropdown: [{ type: i0.ViewChild, args: [IgxComboDropDownComponent, { static: true },] }]
|
|
40841
40838
|
};
|
|
40842
40839
|
/**
|
|
40843
40840
|
* @hidden
|
|
@@ -40860,6 +40857,8 @@
|
|
|
40860
40857
|
IgxComboToggleIconDirective,
|
|
40861
40858
|
IgxComboClearIconDirective],
|
|
40862
40859
|
exports: [IgxComboComponent, IgxComboItemComponent, IgxComboDropDownComponent, IgxComboAddItemComponent,
|
|
40860
|
+
IgxComboGroupingPipe,
|
|
40861
|
+
IgxComboFilteringPipe,
|
|
40863
40862
|
IgxComboItemDirective,
|
|
40864
40863
|
IgxComboEmptyDirective,
|
|
40865
40864
|
IgxComboHeaderItemDirective,
|
|
@@ -40874,6 +40873,387 @@
|
|
|
40874
40873
|
},] }
|
|
40875
40874
|
];
|
|
40876
40875
|
|
|
40876
|
+
/**
|
|
40877
|
+
* Represents a drop-down list that provides filtering functionality, allowing users to choose a single option from a predefined list.
|
|
40878
|
+
*
|
|
40879
|
+
* @igxModule IgxSimpleComboModule
|
|
40880
|
+
* @igxTheme igx-combo-theme
|
|
40881
|
+
* @igxKeywords combobox, single combo selection
|
|
40882
|
+
* @igxGroup Grids & Lists
|
|
40883
|
+
*
|
|
40884
|
+
* @remarks
|
|
40885
|
+
* It provides the ability to filter items as well as perform single selection on the provided data.
|
|
40886
|
+
* Additionally, it exposes keyboard navigation and custom styling capabilities.
|
|
40887
|
+
* @example
|
|
40888
|
+
* ```html
|
|
40889
|
+
* <igx-simple-combo [itemsMaxHeight]="250" [data]="locationData"
|
|
40890
|
+
* [displayKey]="'field'" [valueKey]="'field'"
|
|
40891
|
+
* placeholder="Location" searchPlaceholder="Search...">
|
|
40892
|
+
* </igx-simple-combo>
|
|
40893
|
+
* ```
|
|
40894
|
+
*/
|
|
40895
|
+
var IgxSimpleComboComponent = /** @class */ (function (_super) {
|
|
40896
|
+
__extends(IgxSimpleComboComponent, _super);
|
|
40897
|
+
function IgxSimpleComboComponent(elementRef, cdr, selectionService, comboAPI, _iconService, platformUtil, _displayDensityOptions, _inputGroupType, _injector) {
|
|
40898
|
+
var _this = _super.call(this, elementRef, cdr, selectionService, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector) || this;
|
|
40899
|
+
_this.elementRef = elementRef;
|
|
40900
|
+
_this.cdr = cdr;
|
|
40901
|
+
_this.selectionService = selectionService;
|
|
40902
|
+
_this.comboAPI = comboAPI;
|
|
40903
|
+
_this._iconService = _iconService;
|
|
40904
|
+
_this.platformUtil = platformUtil;
|
|
40905
|
+
_this._displayDensityOptions = _displayDensityOptions;
|
|
40906
|
+
_this._inputGroupType = _inputGroupType;
|
|
40907
|
+
_this._injector = _injector;
|
|
40908
|
+
/**
|
|
40909
|
+
* Emitted when item selection is changing, before the selection completes
|
|
40910
|
+
*
|
|
40911
|
+
* ```html
|
|
40912
|
+
* <igx-simple-combo (selectionChanging)='handleSelection()'></igx-simple-combo>
|
|
40913
|
+
* ```
|
|
40914
|
+
*/
|
|
40915
|
+
_this.selectionChanging = new i0.EventEmitter();
|
|
40916
|
+
/** @hidden @internal */
|
|
40917
|
+
_this.composing = false;
|
|
40918
|
+
_this._updateInput = true;
|
|
40919
|
+
_this.findMatch = function (element) {
|
|
40920
|
+
var value = _this.displayKey ? element[_this.displayKey] : element;
|
|
40921
|
+
return value.toString().toLowerCase().includes(_this.searchValue.trim().toLowerCase());
|
|
40922
|
+
};
|
|
40923
|
+
_this.comboAPI.register(_this);
|
|
40924
|
+
return _this;
|
|
40925
|
+
}
|
|
40926
|
+
Object.defineProperty(IgxSimpleComboComponent.prototype, "filteredData", {
|
|
40927
|
+
/** @hidden @internal */
|
|
40928
|
+
get: function () {
|
|
40929
|
+
return this._filteredData;
|
|
40930
|
+
},
|
|
40931
|
+
/** @hidden @internal */
|
|
40932
|
+
set: function (val) {
|
|
40933
|
+
this._filteredData = this.groupKey ? (val || []).filter(function (e) { return e.isHeader !== true; }) : val;
|
|
40934
|
+
this.checkMatch();
|
|
40935
|
+
},
|
|
40936
|
+
enumerable: false,
|
|
40937
|
+
configurable: true
|
|
40938
|
+
});
|
|
40939
|
+
/** @hidden @internal */
|
|
40940
|
+
IgxSimpleComboComponent.prototype.onArrowDown = function (event) {
|
|
40941
|
+
if (this.collapsed) {
|
|
40942
|
+
event.preventDefault();
|
|
40943
|
+
event.stopPropagation();
|
|
40944
|
+
this.open();
|
|
40945
|
+
}
|
|
40946
|
+
else {
|
|
40947
|
+
if (this.virtDir.igxForOf.length > 0) {
|
|
40948
|
+
this.dropdown.navigateFirst();
|
|
40949
|
+
this.dropdownContainer.nativeElement.focus();
|
|
40950
|
+
}
|
|
40951
|
+
else if (this.allowCustomValues) {
|
|
40952
|
+
this.addItem.element.nativeElement.focus();
|
|
40953
|
+
}
|
|
40954
|
+
}
|
|
40955
|
+
};
|
|
40956
|
+
/**
|
|
40957
|
+
* Select a defined item
|
|
40958
|
+
*
|
|
40959
|
+
* @param item the item to be selected
|
|
40960
|
+
* ```typescript
|
|
40961
|
+
* this.combo.select("New York");
|
|
40962
|
+
* ```
|
|
40963
|
+
*/
|
|
40964
|
+
IgxSimpleComboComponent.prototype.select = function (item) {
|
|
40965
|
+
if (item !== null && item !== undefined) {
|
|
40966
|
+
var newSelection = this.selectionService.add_items(this.id, item instanceof Array ? item : [item], true);
|
|
40967
|
+
this.setSelection(newSelection);
|
|
40968
|
+
}
|
|
40969
|
+
};
|
|
40970
|
+
/**
|
|
40971
|
+
* Deselect the currently selected item
|
|
40972
|
+
*
|
|
40973
|
+
* @param item the items to be deselected
|
|
40974
|
+
* ```typescript
|
|
40975
|
+
* this.combo.deselect("New York");
|
|
40976
|
+
* ```
|
|
40977
|
+
*/
|
|
40978
|
+
IgxSimpleComboComponent.prototype.deselect = function () {
|
|
40979
|
+
this.clearSelection();
|
|
40980
|
+
};
|
|
40981
|
+
/** @hidden @internal */
|
|
40982
|
+
IgxSimpleComboComponent.prototype.writeValue = function (value) {
|
|
40983
|
+
var oldSelection = this.selection;
|
|
40984
|
+
this.selectionService.select_items(this.id, value ? [value] : [], true);
|
|
40985
|
+
this.cdr.markForCheck();
|
|
40986
|
+
this._value = this.createDisplayText(this.selection, oldSelection);
|
|
40987
|
+
};
|
|
40988
|
+
/** @hidden @internal */
|
|
40989
|
+
IgxSimpleComboComponent.prototype.ngAfterViewInit = function () {
|
|
40990
|
+
var _this = this;
|
|
40991
|
+
this.virtDir.contentSizeChange.pipe(operators.takeUntil(this.destroy$)).subscribe(function () {
|
|
40992
|
+
if (_this.selection.length > 0) {
|
|
40993
|
+
var index = _this.virtDir.igxForOf.findIndex(function (e) {
|
|
40994
|
+
var current = e[_this.valueKey];
|
|
40995
|
+
if (_this.valueKey === null || _this.valueKey === undefined) {
|
|
40996
|
+
current = e;
|
|
40997
|
+
}
|
|
40998
|
+
return current === _this.selection[0];
|
|
40999
|
+
});
|
|
41000
|
+
_this.dropdown.navigateItem(index);
|
|
41001
|
+
}
|
|
41002
|
+
});
|
|
41003
|
+
this.dropdown.opened.pipe(operators.takeUntil(this.destroy$)).subscribe(function () {
|
|
41004
|
+
if (_this.composing) {
|
|
41005
|
+
_this.comboInput.focus();
|
|
41006
|
+
}
|
|
41007
|
+
});
|
|
41008
|
+
this.dropdown.closing.pipe(operators.takeUntil(this.destroy$)).subscribe(function (args) {
|
|
41009
|
+
if (_this.getEditElement() && !args.event) {
|
|
41010
|
+
_this.comboInput.focus();
|
|
41011
|
+
}
|
|
41012
|
+
else {
|
|
41013
|
+
_this.clearOnBlur();
|
|
41014
|
+
_this._onTouchedCallback();
|
|
41015
|
+
}
|
|
41016
|
+
});
|
|
41017
|
+
_super.prototype.ngAfterViewInit.call(this);
|
|
41018
|
+
};
|
|
41019
|
+
/** @hidden @internal */
|
|
41020
|
+
IgxSimpleComboComponent.prototype.handleInputChange = function (event) {
|
|
41021
|
+
this.searchValue = event.target.value;
|
|
41022
|
+
this._onChangeCallback(this.searchValue);
|
|
41023
|
+
if (this.collapsed && this.comboInput.focused) {
|
|
41024
|
+
this.open();
|
|
41025
|
+
this.dropdown.navigateFirst();
|
|
41026
|
+
}
|
|
41027
|
+
if (!this.comboInput.value.trim()) {
|
|
41028
|
+
// handle clearing of input by space
|
|
41029
|
+
this.clearSelection();
|
|
41030
|
+
this._onChangeCallback(null);
|
|
41031
|
+
}
|
|
41032
|
+
_super.prototype.handleInputChange.call(this, event);
|
|
41033
|
+
this.composing = true;
|
|
41034
|
+
};
|
|
41035
|
+
/** @hidden @internal */
|
|
41036
|
+
IgxSimpleComboComponent.prototype.handleKeyDown = function (event) {
|
|
41037
|
+
if (event.key === this.platformUtil.KEYMAP.ENTER) {
|
|
41038
|
+
var filtered = this.filteredData.find(this.findMatch);
|
|
41039
|
+
if (filtered === null || filtered === undefined) {
|
|
41040
|
+
return;
|
|
41041
|
+
}
|
|
41042
|
+
this.select(this.dropdown.focusedItem.itemID);
|
|
41043
|
+
event.preventDefault();
|
|
41044
|
+
event.stopPropagation();
|
|
41045
|
+
this.close();
|
|
41046
|
+
// manually trigger text selection as it will not be triggered during editing
|
|
41047
|
+
this.textSelection.trigger();
|
|
41048
|
+
return;
|
|
41049
|
+
}
|
|
41050
|
+
if (event.key === this.platformUtil.KEYMAP.BACKSPACE
|
|
41051
|
+
|| event.key === this.platformUtil.KEYMAP.DELETE) {
|
|
41052
|
+
this._updateInput = false;
|
|
41053
|
+
this.clearSelection();
|
|
41054
|
+
}
|
|
41055
|
+
if (!this.collapsed && event.key === this.platformUtil.KEYMAP.TAB) {
|
|
41056
|
+
this.close();
|
|
41057
|
+
this.clearOnBlur();
|
|
41058
|
+
}
|
|
41059
|
+
this.composing = false;
|
|
41060
|
+
_super.prototype.handleKeyDown.call(this, event);
|
|
41061
|
+
};
|
|
41062
|
+
/** @hidden @internal */
|
|
41063
|
+
IgxSimpleComboComponent.prototype.handleKeyUp = function (event) {
|
|
41064
|
+
if (event.key === this.platformUtil.KEYMAP.ARROW_DOWN) {
|
|
41065
|
+
var firstItem_1 = this.selectionService.first_item(this.id);
|
|
41066
|
+
this.dropdown.focusedItem = firstItem_1 && this.filteredData.length > 0
|
|
41067
|
+
? this.dropdown.items.find(function (i) { return i.itemID === firstItem_1; })
|
|
41068
|
+
: this.dropdown.items[0];
|
|
41069
|
+
this.dropdownContainer.nativeElement.focus();
|
|
41070
|
+
}
|
|
41071
|
+
};
|
|
41072
|
+
/** @hidden @internal */
|
|
41073
|
+
IgxSimpleComboComponent.prototype.handleItemKeyDown = function (event) {
|
|
41074
|
+
if (event.key === this.platformUtil.KEYMAP.ARROW_UP && event.altKey) {
|
|
41075
|
+
this.close();
|
|
41076
|
+
this.comboInput.focus();
|
|
41077
|
+
return;
|
|
41078
|
+
}
|
|
41079
|
+
if (event.key === this.platformUtil.KEYMAP.ENTER) {
|
|
41080
|
+
this.comboInput.focus();
|
|
41081
|
+
}
|
|
41082
|
+
};
|
|
41083
|
+
/** @hidden @internal */
|
|
41084
|
+
IgxSimpleComboComponent.prototype.handleItemClick = function () {
|
|
41085
|
+
this.close();
|
|
41086
|
+
this.comboInput.focus();
|
|
41087
|
+
};
|
|
41088
|
+
/** @hidden @internal */
|
|
41089
|
+
IgxSimpleComboComponent.prototype.onBlur = function () {
|
|
41090
|
+
if (this.collapsed) {
|
|
41091
|
+
this.clearOnBlur();
|
|
41092
|
+
}
|
|
41093
|
+
_super.prototype.onBlur.call(this);
|
|
41094
|
+
};
|
|
41095
|
+
/** @hidden @internal */
|
|
41096
|
+
IgxSimpleComboComponent.prototype.getEditElement = function () {
|
|
41097
|
+
return this.comboInput.nativeElement;
|
|
41098
|
+
};
|
|
41099
|
+
/** @hidden @internal */
|
|
41100
|
+
IgxSimpleComboComponent.prototype.handleClear = function (event) {
|
|
41101
|
+
if (this.disabled) {
|
|
41102
|
+
return;
|
|
41103
|
+
}
|
|
41104
|
+
this.clearSelection(true);
|
|
41105
|
+
if (this.collapsed) {
|
|
41106
|
+
this.open();
|
|
41107
|
+
this.dropdown.navigateFirst();
|
|
41108
|
+
}
|
|
41109
|
+
else {
|
|
41110
|
+
this.focusSearchInput(true);
|
|
41111
|
+
}
|
|
41112
|
+
event.stopPropagation();
|
|
41113
|
+
this.comboInput.value = this.filterValue = this.searchValue = '';
|
|
41114
|
+
this.dropdown.focusedItem = null;
|
|
41115
|
+
this.composing = false;
|
|
41116
|
+
this.comboInput.focus();
|
|
41117
|
+
};
|
|
41118
|
+
/** @hidden @internal */
|
|
41119
|
+
IgxSimpleComboComponent.prototype.handleOpened = function () {
|
|
41120
|
+
this.triggerCheck();
|
|
41121
|
+
this.dropdownContainer.nativeElement.focus();
|
|
41122
|
+
this.opened.emit({ owner: this });
|
|
41123
|
+
};
|
|
41124
|
+
/** @hidden @internal */
|
|
41125
|
+
IgxSimpleComboComponent.prototype.handleClosing = function (e) {
|
|
41126
|
+
var args = { owner: this, event: e.event, cancel: e.cancel };
|
|
41127
|
+
this.closing.emit(args);
|
|
41128
|
+
e.cancel = args.cancel;
|
|
41129
|
+
if (e.cancel) {
|
|
41130
|
+
return;
|
|
41131
|
+
}
|
|
41132
|
+
this.composing = false;
|
|
41133
|
+
// explicitly update selection and trigger text selection so that we don't have to force CD
|
|
41134
|
+
this.textSelection.selected = true;
|
|
41135
|
+
this.textSelection.trigger();
|
|
41136
|
+
};
|
|
41137
|
+
/** @hidden @internal */
|
|
41138
|
+
IgxSimpleComboComponent.prototype.focusSearchInput = function (opening) {
|
|
41139
|
+
if (opening) {
|
|
41140
|
+
this.dropdownContainer.nativeElement.focus();
|
|
41141
|
+
}
|
|
41142
|
+
else {
|
|
41143
|
+
this.comboInput.nativeElement.focus();
|
|
41144
|
+
this.toggle();
|
|
41145
|
+
}
|
|
41146
|
+
};
|
|
41147
|
+
/** @hidden @internal */
|
|
41148
|
+
IgxSimpleComboComponent.prototype.onClick = function (event) {
|
|
41149
|
+
_super.prototype.onClick.call(this, event);
|
|
41150
|
+
if (this.comboInput.value.length === 0) {
|
|
41151
|
+
this.virtDir.scrollTo(0);
|
|
41152
|
+
}
|
|
41153
|
+
};
|
|
41154
|
+
IgxSimpleComboComponent.prototype.setSelection = function (newSelection) {
|
|
41155
|
+
var newSelectionAsArray = newSelection ? Array.from(newSelection) : [];
|
|
41156
|
+
var oldSelectionAsArray = Array.from(this.selectionService.get(this.id) || []);
|
|
41157
|
+
var displayText = this.createDisplayText(newSelectionAsArray, oldSelectionAsArray);
|
|
41158
|
+
var args = {
|
|
41159
|
+
newSelection: newSelectionAsArray[0],
|
|
41160
|
+
oldSelection: oldSelectionAsArray[0],
|
|
41161
|
+
displayText: displayText,
|
|
41162
|
+
owner: this,
|
|
41163
|
+
cancel: false
|
|
41164
|
+
};
|
|
41165
|
+
this.selectionChanging.emit(args);
|
|
41166
|
+
if (!args.cancel) {
|
|
41167
|
+
var argsSelection = args.newSelection !== undefined
|
|
41168
|
+
&& args.newSelection !== null
|
|
41169
|
+
? [args.newSelection]
|
|
41170
|
+
: [];
|
|
41171
|
+
this.selectionService.select_items(this.id, argsSelection, true);
|
|
41172
|
+
if (this._updateInput) {
|
|
41173
|
+
this.comboInput.value = this._value = displayText !== args.displayText
|
|
41174
|
+
? args.displayText
|
|
41175
|
+
: this.createDisplayText(argsSelection, [args.oldSelection]);
|
|
41176
|
+
}
|
|
41177
|
+
this._onChangeCallback(args.newSelection);
|
|
41178
|
+
this._updateInput = true;
|
|
41179
|
+
}
|
|
41180
|
+
};
|
|
41181
|
+
IgxSimpleComboComponent.prototype.createDisplayText = function (newSelection, oldSelection) {
|
|
41182
|
+
var _this = this;
|
|
41183
|
+
if (this.isRemote) {
|
|
41184
|
+
return this.getRemoteSelection(newSelection, oldSelection);
|
|
41185
|
+
}
|
|
41186
|
+
if (this.displayKey !== null && this.displayKey !== undefined
|
|
41187
|
+
&& newSelection.length > 0) {
|
|
41188
|
+
return this.convertKeysToItems(newSelection).map(function (e) { return e[_this.displayKey]; })[0];
|
|
41189
|
+
}
|
|
41190
|
+
return newSelection[0] || '';
|
|
41191
|
+
};
|
|
41192
|
+
IgxSimpleComboComponent.prototype.clearSelection = function (ignoreFilter) {
|
|
41193
|
+
var newSelection = this.selectionService.get_empty();
|
|
41194
|
+
if (this.filteredData.length !== this.data.length && !ignoreFilter) {
|
|
41195
|
+
newSelection = this.selectionService.delete_items(this.id, this.selectionService.get_all_ids(this.filteredData, this.valueKey));
|
|
41196
|
+
}
|
|
41197
|
+
this.setSelection(newSelection);
|
|
41198
|
+
};
|
|
41199
|
+
IgxSimpleComboComponent.prototype.clearOnBlur = function () {
|
|
41200
|
+
var filtered = this.filteredData.find(this.findMatch);
|
|
41201
|
+
if ((filtered === undefined || filtered === null)) {
|
|
41202
|
+
this.close();
|
|
41203
|
+
this.clearSelection();
|
|
41204
|
+
this.searchValue = '';
|
|
41205
|
+
}
|
|
41206
|
+
};
|
|
41207
|
+
return IgxSimpleComboComponent;
|
|
41208
|
+
}(IgxComboBaseDirective));
|
|
41209
|
+
IgxSimpleComboComponent.decorators = [
|
|
41210
|
+
{ type: i0.Component, args: [{
|
|
41211
|
+
selector: 'igx-simple-combo',
|
|
41212
|
+
template: "<igx-input-group #inputGroup [displayDensity]=\"displayDensity\" [suppressInputAutofocus]=\"true\" [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\" aria-autocomplete=\"both\"\n [attr.aria-owns]=\"dropdown.id\" [attr.aria-labelledby]=\"ariaLabelledBy\" [disabled]=\"disabled\"\n [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 *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-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 (keydown)=\"handleItemKeyDown($event)\">\n <igx-combo-item role=\"option\" [singleMode]=\"true\" [itemHeight]='itemHeight' (click)=\"handleItemClick()\" *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 #addItem [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",
|
|
41213
|
+
providers: [
|
|
41214
|
+
IgxComboAPIService,
|
|
41215
|
+
{ provide: IGX_COMBO_COMPONENT, useExisting: IgxSimpleComboComponent },
|
|
41216
|
+
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: IgxSimpleComboComponent, multi: true }
|
|
41217
|
+
]
|
|
41218
|
+
},] }
|
|
41219
|
+
];
|
|
41220
|
+
IgxSimpleComboComponent.ctorParameters = function () { return [
|
|
41221
|
+
{ type: i0.ElementRef },
|
|
41222
|
+
{ type: i0.ChangeDetectorRef },
|
|
41223
|
+
{ type: IgxSelectionAPIService },
|
|
41224
|
+
{ type: IgxComboAPIService },
|
|
41225
|
+
{ type: IgxIconService },
|
|
41226
|
+
{ type: PlatformUtil },
|
|
41227
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [DisplayDensityToken,] }] },
|
|
41228
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [IGX_INPUT_GROUP_TYPE,] }] },
|
|
41229
|
+
{ type: i0.Injector, decorators: [{ type: i0.Optional }] }
|
|
41230
|
+
]; };
|
|
41231
|
+
IgxSimpleComboComponent.propDecorators = {
|
|
41232
|
+
dropdown: [{ type: i0.ViewChild, args: [IgxComboDropDownComponent, { static: true },] }],
|
|
41233
|
+
addItem: [{ type: i0.ViewChild, args: [IgxComboAddItemComponent,] }],
|
|
41234
|
+
selectionChanging: [{ type: i0.Output }],
|
|
41235
|
+
textSelection: [{ type: i0.ViewChild, args: [IgxTextSelectionDirective, { static: true },] }],
|
|
41236
|
+
onArrowDown: [{ type: i0.HostListener, args: ['keydown.ArrowDown', ['$event'],] }, { type: i0.HostListener, args: ['keydown.Alt.ArrowDown', ['$event'],] }]
|
|
41237
|
+
};
|
|
41238
|
+
var IgxSimpleComboModule = /** @class */ (function () {
|
|
41239
|
+
function IgxSimpleComboModule() {
|
|
41240
|
+
}
|
|
41241
|
+
return IgxSimpleComboModule;
|
|
41242
|
+
}());
|
|
41243
|
+
IgxSimpleComboModule.decorators = [
|
|
41244
|
+
{ type: i0.NgModule, args: [{
|
|
41245
|
+
declarations: [IgxSimpleComboComponent],
|
|
41246
|
+
imports: [
|
|
41247
|
+
IgxComboModule, IgxRippleModule, i2.CommonModule,
|
|
41248
|
+
IgxInputGroupModule, forms.FormsModule, forms.ReactiveFormsModule,
|
|
41249
|
+
IgxForOfModule, IgxToggleModule, IgxCheckboxModule,
|
|
41250
|
+
IgxDropDownModule, IgxButtonModule, IgxIconModule,
|
|
41251
|
+
IgxTextSelectionModule
|
|
41252
|
+
],
|
|
41253
|
+
exports: [IgxSimpleComboComponent, IgxComboModule]
|
|
41254
|
+
},] }
|
|
41255
|
+
];
|
|
41256
|
+
|
|
40877
41257
|
/** Header orientation in `dialog` mode. */
|
|
40878
41258
|
var PickerHeaderOrientation = mkenum({
|
|
40879
41259
|
Horizontal: 'horizontal',
|
|
@@ -43474,7 +43854,7 @@
|
|
|
43474
43854
|
{ type: i0.Component, args: [{
|
|
43475
43855
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
43476
43856
|
selector: 'igx-grid-excel-style-filtering',
|
|
43477
|
-
template: "<ng-template #defaultExcelColumnOperations>\n <igx-excel-style-header\n [showHiding]=\"displayDensity !== 'comfortable' && !column?.disableHiding\"\n [showPinning]=\"displayDensity !== 'comfortable' && !column?.disablePinning\"\n [showSelecting]=\"displayDensity !== 'comfortable' && columnSelectable()\"\n >\n </igx-excel-style-header>\n\n <igx-excel-style-sorting *ngIf=\"column?.sortable\">\n </igx-excel-style-sorting>\n\n <igx-excel-style-moving *ngIf=\"column?.movable\">\n </igx-excel-style-moving>\n\n <igx-excel-style-pinning *ngIf=\"!column?.disablePinning && displayDensity==='comfortable'\">\n </igx-excel-style-pinning>\n\n <igx-excel-style-hiding *ngIf=\"!column?.disableHiding && displayDensity==='comfortable'\">\n </igx-excel-style-hiding>\n\n <igx-excel-style-selecting *ngIf=\"columnSelectable() && displayDensity==='comfortable'\">\n </igx-excel-style-selecting>\n</ng-template>\n\n<ng-template #defaultExcelFilterOperations>\n <igx-excel-style-clear-filters>\n </igx-excel-style-clear-filters>\n\n <igx-excel-style-conditional-filter>\n </igx-excel-style-conditional-filter>\n\n <igx-excel-style-search>\n </igx-excel-style-search>\n</ng-template>\n\n<article #mainDropdown\n class=\"igx-excel-filter__menu\"\n [ngClass]=\"{\n 'igx-excel-filter__menu--cosy': displayDensity === 'cosy',\n 'igx-excel-filter__menu--compact': displayDensity === 'compact'\n }\"\n [id]=\"overlayComponentId\"\n (keydown)=\"onKeyDown($event)\"\n [style.min-height]=\"minHeight\"\n [style.max-height]=\"maxHeight\">\n\n <ng-container *ngIf=\"this.excelColumnOperationsDirective; else defaultExcelColumnOperations\">\n <ng-content select=\"igx-excel-style-column-operations,[igxExcelStyleColumnOperations]\">\n </ng-content>\n </ng-container>\n\n <ng-container *ngIf=\"this.excelFilterOperationsDirective; else defaultExcelFilterOperations\">\n <ng-content select=\"igx-excel-style-filter-operations,[igxExcelStyleFilterOperations]\">\n </ng-content>\n </ng-container>\n</article>\n"
|
|
43857
|
+
template: "<ng-template #defaultExcelColumnOperations>\n <igx-excel-style-header\n [showHiding]=\"displayDensity !== 'comfortable' && !column?.disableHiding\"\n [showPinning]=\"displayDensity !== 'comfortable' && !column?.disablePinning\"\n [showSelecting]=\"displayDensity !== 'comfortable' && columnSelectable()\"\n >\n </igx-excel-style-header>\n\n <igx-excel-style-sorting *ngIf=\"column?.sortable\">\n </igx-excel-style-sorting>\n\n <igx-excel-style-moving *ngIf=\"column?.movable\">\n </igx-excel-style-moving>\n\n <igx-excel-style-pinning *ngIf=\"!column?.disablePinning && displayDensity==='comfortable'\">\n </igx-excel-style-pinning>\n\n <igx-excel-style-hiding *ngIf=\"!column?.disableHiding && displayDensity==='comfortable'\">\n </igx-excel-style-hiding>\n\n <igx-excel-style-selecting *ngIf=\"columnSelectable() && displayDensity==='comfortable'\">\n </igx-excel-style-selecting>\n</ng-template>\n\n<ng-template #defaultExcelFilterOperations>\n <igx-excel-style-clear-filters>\n </igx-excel-style-clear-filters>\n\n <igx-excel-style-conditional-filter>\n </igx-excel-style-conditional-filter>\n\n <igx-excel-style-search>\n </igx-excel-style-search>\n</ng-template>\n\n<article #mainDropdown\n class=\"igx-excel-filter__menu\"\n [ngClass]=\"{\n 'igx-excel-filter__menu--cosy': displayDensity === 'cosy',\n 'igx-excel-filter__menu--compact': displayDensity === 'compact'\n }\"\n [id]=\"overlayComponentId\"\n (keydown)=\"onKeyDown($event)\"\n [style.min-height]=\"minHeight\"\n [style.max-height]=\"maxHeight\"\n role=\"menu\">\n\n <ng-container *ngIf=\"this.excelColumnOperationsDirective; else defaultExcelColumnOperations\">\n <ng-content select=\"igx-excel-style-column-operations,[igxExcelStyleColumnOperations]\">\n </ng-content>\n </ng-container>\n\n <ng-container *ngIf=\"this.excelFilterOperationsDirective; else defaultExcelFilterOperations\">\n <ng-content select=\"igx-excel-style-filter-operations,[igxExcelStyleFilterOperations]\">\n </ng-content>\n </ng-container>\n</article>\n"
|
|
43478
43858
|
},] }
|
|
43479
43859
|
];
|
|
43480
43860
|
IgxGridExcelStyleFilteringComponent.ctorParameters = function () { return [
|
|
@@ -45210,7 +45590,7 @@
|
|
|
45210
45590
|
{ type: i0.Component, args: [{
|
|
45211
45591
|
preserveWhitespaces: false,
|
|
45212
45592
|
selector: 'igx-excel-style-date-expression',
|
|
45213
|
-
template: "<igx-select #dropdownConditions\n type=\"box\"\n [displayDensity]=\"displayDensity\"\n [placeholder]=\"conditionsPlaceholder\"\n (selectionChanging)=\"onConditionsChanged($event)\"\n [overlaySettings]=\"dropDownOverlaySettings\">\n <igx-prefix>\n <igx-icon *ngIf=\"expressionUI.expression.condition\" family=\"imx-icons\" [name]=\"getIconName()\"></igx-icon>\n <igx-icon *ngIf=\"!expressionUI.expression.condition\">filter_list</igx-icon>\n </igx-prefix>\n <igx-select-item *ngFor=\"let condition of conditions\" [value]=\"condition\" [selected]=\"isConditionSelected(condition)\">\n <igx-icon family=\"imx-icons\" [name]=\"getCondition(condition).iconName\"></igx-icon>\n <span>{{translateCondition(condition)}}</span>\n </igx-select-item>\n</igx-select>\n\n<igx-date-picker #picker *ngIf=\"column.dataType === 'date'\"\n [(value)]=\"expressionUI.expression.searchVal\"\n [locale]=\"grid.locale\"\n [outlet]=\"grid.outlet\"\n [displayDensity]=\"displayDensity\"\n (click)=\"picker.open()\"\n [readOnly]=\"true\"\n [placeholder]=\"inputDatePlaceholder\"\n [displayFormat]=\"column.pipeArgs.format\"\n [formatter]=\"column.formatter\"\n [disabled]=\"expressionUI.expression.condition && expressionUI.expression.condition.isUnary\"\n type=\"box\">\n <!-- disable default icons -->\n <igx-picker-toggle></igx-picker-toggle>\n <igx-picker-clear></igx-picker-clear>\n</igx-date-picker>\n\n<igx-time-picker #picker *ngIf=\"column.dataType === 'time'\"\n [inputFormat]=\"column.defaultTimeFormat\"\n [(value)]=\"expressionUI.expression.searchVal\"\n [locale]=\"grid.locale\"\n [outlet]=\"grid.outlet\"\n [displayDensity]=\"displayDensity\"\n (click)=\"picker.open()\"\n [readOnly]=\"true\"\n [placeholder]=\"inputTimePlaceholder\"\n [displayFormat]=\"column.pipeArgs.format\"\n [formatter]=\"column.formatter\"\n [disabled]=\"expressionUI.expression.condition && expressionUI.expression.condition.isUnary\"\n type=\"box\">\n <!-- disable default icons -->\n <igx-picker-toggle></igx-picker-toggle>\n <igx-picker-clear></igx-picker-clear>\n</igx-time-picker>\n\n<igx-input-group #dropDownTarget *ngIf=\"column.dataType === 'dateTime'\" #inputGroup type=\"box\" [displayDensity]=\"displayDensity\">\n <input #input igxInput tabindex=\"0\"\n [placeholder]=\"inputDatePlaceholder\"\n [igxDateTimeEditor]=\"column.defaultDateTimeFormat\"\n [(ngModel)]=\"expressionUI.expression.searchVal\"\n [disabled]=\"expressionUI.expression.condition && expressionUI.expression.condition.isUnary\"/>\n</igx-input-group>\n\n<button (click)=\"onRemoveButtonClick()\" igxButton=\"icon\" [displayDensity]=\"displayDensity\" *ngIf=\"!isSingle\" >\n <igx-icon>cancel</igx-icon>\n</button>\n\n<igx-buttongroup #logicOperatorButtonGroup\n *ngIf=\"!isLast\"\n [multiSelection]=\"false\">\n <span igxButton [displayDensity]=\"displayDensity\"\n #andButton\n (keydown)=\"onLogicOperatorKeyDown($event, 0)\"\n tabindex=\"0\"\n [selected]=\"expressionUI.afterOperator === 0\"\n type=\"button\"\n (click)=\"onLogicOperatorButtonClicked($event, 0)\">\n {{ grid.resourceStrings.igx_grid_filter_operator_and }}\n </span>\n\n <span igxButton [displayDensity]=\"displayDensity\"\n #orButton\n tabindex=\"0\"\n (keydown)=\"onLogicOperatorKeyDown($event, 1)\"\n [selected]=\"expressionUI.afterOperator === 1\"\n type=\"button\"\n (click)=\"onLogicOperatorButtonClicked($event, 1)\">\n {{ grid.resourceStrings.igx_grid_filter_operator_or }}\n </span>\n</igx-buttongroup>\n\n<div #overlayOutlet\n igxOverlayOutlet\n (pointerdown)=\"onOutletPointerDown($event)\">\n</div>\n"
|
|
45593
|
+
template: "<igx-select #dropdownConditions\n type=\"box\"\n [displayDensity]=\"displayDensity\"\n [placeholder]=\"conditionsPlaceholder\"\n (selectionChanging)=\"onConditionsChanged($event)\"\n [overlaySettings]=\"dropDownOverlaySettings\">\n <igx-prefix>\n <igx-icon *ngIf=\"expressionUI.expression.condition\" family=\"imx-icons\" [name]=\"getIconName()\"></igx-icon>\n <igx-icon *ngIf=\"!expressionUI.expression.condition\">filter_list</igx-icon>\n </igx-prefix>\n <igx-select-item *ngFor=\"let condition of conditions\" [value]=\"condition\" [text]=\"getConditionFriendlyName(condition)\" [selected]=\"isConditionSelected(condition)\">\n <igx-icon family=\"imx-icons\" [name]=\"getCondition(condition).iconName\"></igx-icon>\n <span>{{translateCondition(condition)}}</span>\n </igx-select-item>\n</igx-select>\n\n<igx-date-picker #picker *ngIf=\"column.dataType === 'date'\"\n [(value)]=\"expressionUI.expression.searchVal\"\n [locale]=\"grid.locale\"\n [outlet]=\"grid.outlet\"\n [displayDensity]=\"displayDensity\"\n (click)=\"picker.open()\"\n [readOnly]=\"true\"\n [placeholder]=\"inputDatePlaceholder\"\n [displayFormat]=\"column.pipeArgs.format\"\n [formatter]=\"column.formatter\"\n [disabled]=\"expressionUI.expression.condition && expressionUI.expression.condition.isUnary\"\n type=\"box\">\n <!-- disable default icons -->\n <igx-picker-toggle></igx-picker-toggle>\n <igx-picker-clear></igx-picker-clear>\n</igx-date-picker>\n\n<igx-time-picker #picker *ngIf=\"column.dataType === 'time'\"\n [inputFormat]=\"column.defaultTimeFormat\"\n [(value)]=\"expressionUI.expression.searchVal\"\n [locale]=\"grid.locale\"\n [outlet]=\"grid.outlet\"\n [displayDensity]=\"displayDensity\"\n (click)=\"picker.open()\"\n [readOnly]=\"true\"\n [placeholder]=\"inputTimePlaceholder\"\n [displayFormat]=\"column.pipeArgs.format\"\n [formatter]=\"column.formatter\"\n [disabled]=\"expressionUI.expression.condition && expressionUI.expression.condition.isUnary\"\n type=\"box\">\n <!-- disable default icons -->\n <igx-picker-toggle></igx-picker-toggle>\n <igx-picker-clear></igx-picker-clear>\n</igx-time-picker>\n\n<igx-input-group #dropDownTarget *ngIf=\"column.dataType === 'dateTime'\" #inputGroup type=\"box\" [displayDensity]=\"displayDensity\">\n <input #input igxInput tabindex=\"0\"\n [placeholder]=\"inputDatePlaceholder\"\n [igxDateTimeEditor]=\"column.defaultDateTimeFormat\"\n [(ngModel)]=\"expressionUI.expression.searchVal\"\n [disabled]=\"expressionUI.expression.condition && expressionUI.expression.condition.isUnary\"/>\n</igx-input-group>\n\n<button (click)=\"onRemoveButtonClick()\" igxButton=\"icon\" [displayDensity]=\"displayDensity\" *ngIf=\"!isSingle\" >\n <igx-icon>cancel</igx-icon>\n</button>\n\n<igx-buttongroup #logicOperatorButtonGroup\n *ngIf=\"!isLast\"\n [multiSelection]=\"false\">\n <span igxButton [displayDensity]=\"displayDensity\"\n #andButton\n (keydown)=\"onLogicOperatorKeyDown($event, 0)\"\n tabindex=\"0\"\n [selected]=\"expressionUI.afterOperator === 0\"\n type=\"button\"\n (click)=\"onLogicOperatorButtonClicked($event, 0)\">\n {{ grid.resourceStrings.igx_grid_filter_operator_and }}\n </span>\n\n <span igxButton [displayDensity]=\"displayDensity\"\n #orButton\n tabindex=\"0\"\n (keydown)=\"onLogicOperatorKeyDown($event, 1)\"\n [selected]=\"expressionUI.afterOperator === 1\"\n type=\"button\"\n (click)=\"onLogicOperatorButtonClicked($event, 1)\">\n {{ grid.resourceStrings.igx_grid_filter_operator_or }}\n </span>\n</igx-buttongroup>\n\n<div #overlayOutlet\n igxOverlayOutlet\n (pointerdown)=\"onOutletPointerDown($event)\">\n</div>\n"
|
|
45214
45594
|
},] }
|
|
45215
45595
|
];
|
|
45216
45596
|
IgxExcelStyleDateExpressionComponent.propDecorators = {
|
|
@@ -45925,7 +46305,7 @@
|
|
|
45925
46305
|
* @param target Target name
|
|
45926
46306
|
*/
|
|
45927
46307
|
HammerGesturesManager.prototype.getGlobalEventTarget = function (target) {
|
|
45928
|
-
return i1$1
|
|
46308
|
+
return i1$1["ɵgetDOM"]().getGlobalEventTarget(this.doc, target);
|
|
45929
46309
|
};
|
|
45930
46310
|
/**
|
|
45931
46311
|
* Set HammerManager options.
|
|
@@ -52282,15 +52662,23 @@
|
|
|
52282
52662
|
var _this = this;
|
|
52283
52663
|
if (!val && val !== 0) {
|
|
52284
52664
|
this.expression.searchVal = null;
|
|
52285
|
-
this.
|
|
52665
|
+
var index = this.expressionsList.findIndex(function (item) { return item.expression === _this.expression; });
|
|
52666
|
+
if (index === 0 && this.expressionsList.length === 1) {
|
|
52667
|
+
this.clearFiltering();
|
|
52668
|
+
return;
|
|
52669
|
+
}
|
|
52286
52670
|
}
|
|
52287
52671
|
else {
|
|
52672
|
+
var oldValue = this.expression.searchVal;
|
|
52673
|
+
if (isEqual(oldValue, val)) {
|
|
52674
|
+
return;
|
|
52675
|
+
}
|
|
52288
52676
|
this.expression.searchVal = DataUtil.parseValue(this.column.dataType, val);
|
|
52289
52677
|
if (this.expressionsList.find(function (item) { return item.expression === _this.expression; }) === undefined) {
|
|
52290
52678
|
this.addExpression(true);
|
|
52291
52679
|
}
|
|
52680
|
+
this.filter();
|
|
52292
52681
|
}
|
|
52293
|
-
this.filter();
|
|
52294
52682
|
},
|
|
52295
52683
|
enumerable: false,
|
|
52296
52684
|
configurable: true
|
|
@@ -57307,7 +57695,7 @@
|
|
|
57307
57695
|
this.rendered$.pipe(operators.takeUntil(this.destroy$)).subscribe(function () {
|
|
57308
57696
|
if (_this.paginator) {
|
|
57309
57697
|
_this.paginator.perPage = _this._perPage !== DEFAULT_ITEMS_PER_PAGE ? _this._perPage : _this.paginator.perPage;
|
|
57310
|
-
_this.paginator.totalRecords = _this.totalRecords;
|
|
57698
|
+
_this.paginator.totalRecords = _this.totalRecords ? _this.totalRecords : _this.paginator.totalRecords;
|
|
57311
57699
|
_this.paginator.overlaySettings = { outlet: _this.outlet };
|
|
57312
57700
|
}
|
|
57313
57701
|
_this._rendered = true;
|
|
@@ -61400,7 +61788,7 @@
|
|
|
61400
61788
|
get: function () {
|
|
61401
61789
|
var _a, _b;
|
|
61402
61790
|
if (this.inEditMode) {
|
|
61403
|
-
return mergeWith__default[
|
|
61791
|
+
return mergeWith__default["default"](cloneValue((_a = this._data) !== null && _a !== void 0 ? _a : this.grid.dataView[this.index]), this.grid.transactions.getAggregatedValue(this.key, false), function (objValue, srcValue) {
|
|
61404
61792
|
if (Array.isArray(srcValue)) {
|
|
61405
61793
|
return objValue = srcValue;
|
|
61406
61794
|
}
|
|
@@ -61760,7 +62148,7 @@
|
|
|
61760
62148
|
get: function () {
|
|
61761
62149
|
var _a;
|
|
61762
62150
|
if (this.inEditMode) {
|
|
61763
|
-
return mergeWith__default[
|
|
62151
|
+
return mergeWith__default["default"](cloneValue((_a = this._data) !== null && _a !== void 0 ? _a : this.grid.dataView[this.index]), this.grid.transactions.getAggregatedValue(this.key, false), function (objValue, srcValue) {
|
|
61764
62152
|
if (Array.isArray(srcValue)) {
|
|
61765
62153
|
return objValue = srcValue;
|
|
61766
62154
|
}
|
|
@@ -72801,7 +73189,7 @@
|
|
|
72801
73189
|
// if a row has been added and before commiting the transaction deleted
|
|
72802
73190
|
var leafRowsDirectParents_1 = new Set();
|
|
72803
73191
|
_this.records.forEach(function (record) {
|
|
72804
|
-
if (record && !record.children && record.parent) {
|
|
73192
|
+
if (record && (!record.children || record.children.length === 0) && record.parent) {
|
|
72805
73193
|
leafRowsDirectParents_1.add(record.parent);
|
|
72806
73194
|
}
|
|
72807
73195
|
});
|
|
@@ -72817,7 +73205,7 @@
|
|
|
72817
73205
|
if (_this.rowSelection === GridSelectionMode.multipleCascade) {
|
|
72818
73206
|
var leafRowsDirectParents_2 = new Set();
|
|
72819
73207
|
_this.records.forEach(function (record) {
|
|
72820
|
-
if (record && !record.children && record.parent) {
|
|
73208
|
+
if (record && (!record.children || record.children.length === 0) && record.parent) {
|
|
72821
73209
|
leafRowsDirectParents_2.add(record.parent);
|
|
72822
73210
|
}
|
|
72823
73211
|
});
|
|
@@ -85848,6 +86236,8 @@
|
|
|
85848
86236
|
exports.IgxSelectItemComponent = IgxSelectItemComponent;
|
|
85849
86237
|
exports.IgxSelectModule = IgxSelectModule;
|
|
85850
86238
|
exports.IgxSelectToggleIconDirective = IgxSelectToggleIconDirective;
|
|
86239
|
+
exports.IgxSimpleComboComponent = IgxSimpleComboComponent;
|
|
86240
|
+
exports.IgxSimpleComboModule = IgxSimpleComboModule;
|
|
85851
86241
|
exports.IgxSlideComponent = IgxSlideComponent;
|
|
85852
86242
|
exports.IgxSliderComponent = IgxSliderComponent;
|
|
85853
86243
|
exports.IgxSliderModule = IgxSliderModule;
|
|
@@ -86057,205 +86447,206 @@
|
|
|
86057
86447
|
exports.toPercent = toPercent;
|
|
86058
86448
|
exports.valueInRange = valueInRange;
|
|
86059
86449
|
exports.weekDay = weekDay;
|
|
86060
|
-
exports
|
|
86061
|
-
exports
|
|
86062
|
-
exports
|
|
86063
|
-
exports
|
|
86064
|
-
exports
|
|
86065
|
-
exports
|
|
86066
|
-
exports
|
|
86067
|
-
exports
|
|
86068
|
-
exports
|
|
86069
|
-
exports
|
|
86070
|
-
exports
|
|
86071
|
-
exports
|
|
86072
|
-
exports
|
|
86073
|
-
exports
|
|
86074
|
-
exports
|
|
86075
|
-
exports
|
|
86076
|
-
exports
|
|
86077
|
-
exports
|
|
86078
|
-
exports
|
|
86079
|
-
exports
|
|
86080
|
-
exports
|
|
86081
|
-
exports
|
|
86082
|
-
exports
|
|
86083
|
-
exports
|
|
86084
|
-
exports
|
|
86085
|
-
exports
|
|
86086
|
-
exports
|
|
86087
|
-
exports
|
|
86088
|
-
exports
|
|
86089
|
-
exports
|
|
86090
|
-
exports
|
|
86091
|
-
exports
|
|
86092
|
-
exports
|
|
86093
|
-
exports
|
|
86094
|
-
exports
|
|
86095
|
-
exports
|
|
86096
|
-
exports
|
|
86097
|
-
exports
|
|
86098
|
-
exports
|
|
86099
|
-
exports
|
|
86100
|
-
exports
|
|
86101
|
-
exports
|
|
86102
|
-
exports
|
|
86103
|
-
exports
|
|
86104
|
-
exports
|
|
86105
|
-
exports
|
|
86106
|
-
exports
|
|
86107
|
-
exports
|
|
86108
|
-
exports
|
|
86109
|
-
exports
|
|
86110
|
-
exports
|
|
86111
|
-
exports
|
|
86112
|
-
exports
|
|
86113
|
-
exports
|
|
86114
|
-
exports
|
|
86115
|
-
exports
|
|
86116
|
-
exports
|
|
86117
|
-
exports
|
|
86118
|
-
exports
|
|
86119
|
-
exports
|
|
86120
|
-
exports
|
|
86121
|
-
exports
|
|
86122
|
-
exports
|
|
86123
|
-
exports
|
|
86124
|
-
exports
|
|
86125
|
-
exports
|
|
86126
|
-
exports
|
|
86127
|
-
exports
|
|
86128
|
-
exports
|
|
86129
|
-
exports
|
|
86130
|
-
exports
|
|
86131
|
-
exports
|
|
86132
|
-
exports
|
|
86133
|
-
exports
|
|
86134
|
-
exports
|
|
86135
|
-
exports
|
|
86136
|
-
exports
|
|
86137
|
-
exports
|
|
86138
|
-
exports
|
|
86139
|
-
exports
|
|
86140
|
-
exports
|
|
86141
|
-
exports
|
|
86142
|
-
exports
|
|
86143
|
-
exports
|
|
86144
|
-
exports
|
|
86145
|
-
exports
|
|
86146
|
-
exports
|
|
86147
|
-
exports
|
|
86148
|
-
exports
|
|
86149
|
-
exports
|
|
86150
|
-
exports
|
|
86151
|
-
exports
|
|
86152
|
-
exports
|
|
86153
|
-
exports
|
|
86154
|
-
exports
|
|
86155
|
-
exports
|
|
86156
|
-
exports
|
|
86157
|
-
exports
|
|
86158
|
-
exports
|
|
86159
|
-
exports
|
|
86160
|
-
exports
|
|
86161
|
-
exports
|
|
86162
|
-
exports
|
|
86163
|
-
exports
|
|
86164
|
-
exports
|
|
86165
|
-
exports
|
|
86166
|
-
exports
|
|
86167
|
-
exports
|
|
86168
|
-
exports
|
|
86169
|
-
exports
|
|
86170
|
-
exports
|
|
86171
|
-
exports
|
|
86172
|
-
exports
|
|
86173
|
-
exports
|
|
86174
|
-
exports
|
|
86175
|
-
exports
|
|
86176
|
-
exports
|
|
86177
|
-
exports
|
|
86178
|
-
exports
|
|
86179
|
-
exports
|
|
86180
|
-
exports
|
|
86181
|
-
exports
|
|
86182
|
-
exports
|
|
86183
|
-
exports
|
|
86184
|
-
exports
|
|
86185
|
-
exports
|
|
86186
|
-
exports
|
|
86187
|
-
exports
|
|
86188
|
-
exports
|
|
86189
|
-
exports
|
|
86190
|
-
exports
|
|
86191
|
-
exports
|
|
86192
|
-
exports
|
|
86193
|
-
exports
|
|
86194
|
-
exports
|
|
86195
|
-
exports
|
|
86196
|
-
exports
|
|
86197
|
-
exports
|
|
86198
|
-
exports
|
|
86199
|
-
exports
|
|
86200
|
-
exports
|
|
86201
|
-
exports
|
|
86202
|
-
exports
|
|
86203
|
-
exports
|
|
86204
|
-
exports
|
|
86205
|
-
exports
|
|
86206
|
-
exports
|
|
86207
|
-
exports
|
|
86208
|
-
exports
|
|
86209
|
-
exports
|
|
86210
|
-
exports
|
|
86211
|
-
exports
|
|
86212
|
-
exports
|
|
86213
|
-
exports
|
|
86214
|
-
exports
|
|
86215
|
-
exports
|
|
86216
|
-
exports
|
|
86217
|
-
exports
|
|
86218
|
-
exports
|
|
86219
|
-
exports
|
|
86220
|
-
exports
|
|
86221
|
-
exports
|
|
86222
|
-
exports
|
|
86223
|
-
exports
|
|
86224
|
-
exports
|
|
86225
|
-
exports
|
|
86226
|
-
exports
|
|
86227
|
-
exports
|
|
86228
|
-
exports
|
|
86229
|
-
exports
|
|
86230
|
-
exports
|
|
86231
|
-
exports
|
|
86232
|
-
exports
|
|
86233
|
-
exports
|
|
86234
|
-
exports
|
|
86235
|
-
exports
|
|
86236
|
-
exports
|
|
86237
|
-
exports
|
|
86238
|
-
exports
|
|
86239
|
-
exports
|
|
86240
|
-
exports
|
|
86241
|
-
exports
|
|
86242
|
-
exports
|
|
86243
|
-
exports
|
|
86244
|
-
exports
|
|
86245
|
-
exports
|
|
86246
|
-
exports
|
|
86247
|
-
exports
|
|
86248
|
-
exports
|
|
86249
|
-
exports
|
|
86250
|
-
exports
|
|
86251
|
-
exports
|
|
86252
|
-
exports
|
|
86253
|
-
exports
|
|
86254
|
-
exports
|
|
86255
|
-
exports
|
|
86256
|
-
exports
|
|
86450
|
+
exports["ɵ1"] = ɵ1;
|
|
86451
|
+
exports["ɵ2"] = ɵ2;
|
|
86452
|
+
exports["ɵa"] = IgxActionStripMenuItemDirective;
|
|
86453
|
+
exports["ɵb"] = IGX_DROPDOWN_BASE;
|
|
86454
|
+
exports["ɵba"] = IgxExpansionPanelTitleDirective;
|
|
86455
|
+
exports["ɵbb"] = IgxExpansionPanelDescriptionDirective;
|
|
86456
|
+
exports["ɵbc"] = IgxExpansionPanelIconDirective;
|
|
86457
|
+
exports["ɵbd"] = IgxBannerActionsDirective;
|
|
86458
|
+
exports["ɵbe"] = IgxDaysViewNavigationService;
|
|
86459
|
+
exports["ɵbf"] = IgxDayItemComponent;
|
|
86460
|
+
exports["ɵbg"] = IgxMonthViewSlotsCalendar;
|
|
86461
|
+
exports["ɵbh"] = IgxGetViewDateCalendar;
|
|
86462
|
+
exports["ɵbi"] = IgxCarouselIndicatorDirective;
|
|
86463
|
+
exports["ɵbj"] = IgxCarouselNextButtonDirective;
|
|
86464
|
+
exports["ɵbk"] = IgxCarouselPrevButtonDirective;
|
|
86465
|
+
exports["ɵbl"] = IGX_COMBO_COMPONENT;
|
|
86466
|
+
exports["ɵbn"] = IgxComboBaseDirective;
|
|
86467
|
+
exports["ɵbo"] = IgxComboHeaderDirective;
|
|
86468
|
+
exports["ɵbp"] = IgxComboFooterDirective;
|
|
86469
|
+
exports["ɵbq"] = IgxComboItemDirective;
|
|
86470
|
+
exports["ɵbr"] = IgxComboEmptyDirective;
|
|
86471
|
+
exports["ɵbs"] = IgxComboHeaderItemDirective;
|
|
86472
|
+
exports["ɵbt"] = IgxComboAddItemDirective;
|
|
86473
|
+
exports["ɵbu"] = IgxComboToggleIconDirective;
|
|
86474
|
+
exports["ɵbv"] = IgxComboClearIconDirective;
|
|
86475
|
+
exports["ɵbw"] = IgxComboAPIService;
|
|
86476
|
+
exports["ɵbx"] = IgxComboDropDownComponent;
|
|
86477
|
+
exports["ɵby"] = IgxComboItemComponent;
|
|
86478
|
+
exports["ɵbz"] = IgxComboFilteringPipe;
|
|
86479
|
+
exports["ɵca"] = IgxComboGroupingPipe;
|
|
86480
|
+
exports["ɵcb"] = IgxComboAddItemComponent;
|
|
86481
|
+
exports["ɵcc"] = PickerBaseDirective;
|
|
86482
|
+
exports["ɵcd"] = IgxCalendarContainerComponent;
|
|
86483
|
+
exports["ɵce"] = IgxCalendarContainerModule;
|
|
86484
|
+
exports["ɵcf"] = IgxDialogTitleDirective;
|
|
86485
|
+
exports["ɵcg"] = IgxDialogActionsDirective;
|
|
86486
|
+
exports["ɵch"] = IgxCellCrudState;
|
|
86487
|
+
exports["ɵci"] = IgxRowCrudState;
|
|
86488
|
+
exports["ɵcj"] = IgxRowAddCrudState;
|
|
86489
|
+
exports["ɵck"] = IgxGridCRUDService;
|
|
86490
|
+
exports["ɵcl"] = IgxColumnMovingService;
|
|
86491
|
+
exports["ɵcm"] = IgxExcelStyleCustomDialogComponent;
|
|
86492
|
+
exports["ɵcn"] = IgxExcelStyleDefaultExpressionComponent;
|
|
86493
|
+
exports["ɵco"] = IgxExcelStyleDateExpressionComponent;
|
|
86494
|
+
exports["ɵcp"] = HammerGesturesManager;
|
|
86495
|
+
exports["ɵcq"] = WatchChanges;
|
|
86496
|
+
exports["ɵcr"] = WatchColumnChanges;
|
|
86497
|
+
exports["ɵcs"] = notifyChanges;
|
|
86498
|
+
exports["ɵct"] = IgxNotificationsDirective;
|
|
86499
|
+
exports["ɵcu"] = IgxGridColumnResizerComponent;
|
|
86500
|
+
exports["ɵcv"] = IgxColumnResizerDirective;
|
|
86501
|
+
exports["ɵcw"] = IgxColumnResizingService;
|
|
86502
|
+
exports["ɵcx"] = IgxRowSelectorDirective;
|
|
86503
|
+
exports["ɵcy"] = IgxGroupByRowSelectorDirective;
|
|
86504
|
+
exports["ɵcz"] = IgxHeadSelectorDirective;
|
|
86505
|
+
exports["ɵd"] = IgxGridSelectionService;
|
|
86506
|
+
exports["ɵda"] = IgxRowDragDirective;
|
|
86507
|
+
exports["ɵdb"] = IgxDragIndicatorIconDirective;
|
|
86508
|
+
exports["ɵdc"] = IgxRowDragGhostDirective;
|
|
86509
|
+
exports["ɵdd"] = IgxRowDragModule;
|
|
86510
|
+
exports["ɵde"] = IgxGridHeaderRowComponent;
|
|
86511
|
+
exports["ɵdf"] = IgxGridHeaderGroupComponent;
|
|
86512
|
+
exports["ɵdg"] = IgxGridHeaderComponent;
|
|
86513
|
+
exports["ɵdh"] = IgxGridFilteringCellComponent;
|
|
86514
|
+
exports["ɵdi"] = IgxFilteringService;
|
|
86515
|
+
exports["ɵdj"] = IgxGridFilteringRowComponent;
|
|
86516
|
+
exports["ɵdk"] = IgxGridGroupByAreaComponent;
|
|
86517
|
+
exports["ɵdl"] = IgxGroupByAreaDirective;
|
|
86518
|
+
exports["ɵdm"] = IgxGroupByMetaPipe;
|
|
86519
|
+
exports["ɵdn"] = IgxTemplateOutletDirective;
|
|
86520
|
+
exports["ɵdo"] = IgxTemplateOutletModule;
|
|
86521
|
+
exports["ɵdp"] = IgxRowEditTemplateDirective;
|
|
86522
|
+
exports["ɵdq"] = IgxRowEditTextDirective;
|
|
86523
|
+
exports["ɵdr"] = IgxRowAddTextDirective;
|
|
86524
|
+
exports["ɵds"] = IgxRowEditActionsDirective;
|
|
86525
|
+
exports["ɵdt"] = IgxRowEditTabStopDirective;
|
|
86526
|
+
exports["ɵdu"] = IgxSummaryRowComponent;
|
|
86527
|
+
exports["ɵdv"] = IgxSummaryCellComponent;
|
|
86528
|
+
exports["ɵdw"] = IgxRowDirective;
|
|
86529
|
+
exports["ɵdx"] = IgxGridNavigationService;
|
|
86530
|
+
exports["ɵdy"] = IgxGridSummaryService;
|
|
86531
|
+
exports["ɵdz"] = ConnectedPositioningStrategy;
|
|
86532
|
+
exports["ɵea"] = IgxGridGroupByRowComponent;
|
|
86533
|
+
exports["ɵeb"] = IgxTreeGridSelectionService;
|
|
86534
|
+
exports["ɵec"] = IgxTreeGridGroupByAreaComponent;
|
|
86535
|
+
exports["ɵed"] = IgxRowLoadingIndicatorTemplateDirective;
|
|
86536
|
+
exports["ɵee"] = IgxHierarchicalGridNavigationService;
|
|
86537
|
+
exports["ɵef"] = IgxChildGridRowComponent;
|
|
86538
|
+
exports["ɵeg"] = IgxGridCellComponent;
|
|
86539
|
+
exports["ɵeh"] = IgxGridFooterComponent;
|
|
86540
|
+
exports["ɵei"] = IgxAdvancedFilteringDialogComponent;
|
|
86541
|
+
exports["ɵej"] = IgxColumnHidingDirective;
|
|
86542
|
+
exports["ɵek"] = IgxColumnPinningDirective;
|
|
86543
|
+
exports["ɵel"] = IgxGridSharedModules;
|
|
86544
|
+
exports["ɵem"] = IgxProcessBarTextTemplateDirective;
|
|
86545
|
+
exports["ɵen"] = IgxProgressBarGradientDirective;
|
|
86546
|
+
exports["ɵeo"] = DIR_DOCUMENT_FACTORY;
|
|
86547
|
+
exports["ɵep"] = DIR_DOCUMENT;
|
|
86548
|
+
exports["ɵeq"] = IgxDirectionality;
|
|
86549
|
+
exports["ɵer"] = IgxSelectItemNavigationDirective;
|
|
86550
|
+
exports["ɵes"] = IGX_TIME_PICKER_COMPONENT;
|
|
86551
|
+
exports["ɵeu"] = IgxItemListDirective;
|
|
86552
|
+
exports["ɵev"] = IgxTimeItemDirective;
|
|
86553
|
+
exports["ɵew"] = IgxTimePickerTemplateDirective;
|
|
86554
|
+
exports["ɵex"] = IgxTimePickerActionsDirective;
|
|
86555
|
+
exports["ɵey"] = TimeFormatPipe;
|
|
86556
|
+
exports["ɵez"] = TimeItemPipe;
|
|
86557
|
+
exports["ɵf"] = IGX_EXPANSION_PANEL_COMPONENT;
|
|
86558
|
+
exports["ɵfa"] = IgxGridPipesModule;
|
|
86559
|
+
exports["ɵfb"] = IgxGridCellStyleClassesPipe;
|
|
86560
|
+
exports["ɵfc"] = IgxGridCellStylesPipe;
|
|
86561
|
+
exports["ɵfd"] = IgxGridRowClassesPipe;
|
|
86562
|
+
exports["ɵfe"] = IgxGridRowStylesPipe;
|
|
86563
|
+
exports["ɵff"] = IgxGridNotGroupedPipe;
|
|
86564
|
+
exports["ɵfg"] = IgxGridTopLevelColumns;
|
|
86565
|
+
exports["ɵfh"] = IgxGridFilterConditionPipe;
|
|
86566
|
+
exports["ɵfi"] = IgxGridTransactionPipe;
|
|
86567
|
+
exports["ɵfj"] = IgxGridPaginatorOptionsPipe;
|
|
86568
|
+
exports["ɵfk"] = IgxHasVisibleColumnsPipe;
|
|
86569
|
+
exports["ɵfl"] = IgxGridRowPinningPipe;
|
|
86570
|
+
exports["ɵfm"] = IgxColumnActionEnabledPipe;
|
|
86571
|
+
exports["ɵfn"] = IgxFilterActionColumnsPipe;
|
|
86572
|
+
exports["ɵfo"] = IgxSortActionColumnsPipe;
|
|
86573
|
+
exports["ɵfp"] = IgxGridDataMapperPipe;
|
|
86574
|
+
exports["ɵfq"] = IgxStringReplacePipe;
|
|
86575
|
+
exports["ɵfr"] = IgxGridTransactionStatePipe;
|
|
86576
|
+
exports["ɵfs"] = IgxColumnFormatterPipe;
|
|
86577
|
+
exports["ɵft"] = IgxSummaryFormatterPipe;
|
|
86578
|
+
exports["ɵfu"] = IgxGridAddRowPipe;
|
|
86579
|
+
exports["ɵfv"] = IgxHeaderGroupWidthPipe;
|
|
86580
|
+
exports["ɵfw"] = IgxHeaderGroupStylePipe;
|
|
86581
|
+
exports["ɵfx"] = IgxGridColumnModule;
|
|
86582
|
+
exports["ɵfy"] = IgxGridHeadersModule;
|
|
86583
|
+
exports["ɵfz"] = SortingIndexPipe;
|
|
86584
|
+
exports["ɵg"] = IGX_TREE_COMPONENT;
|
|
86585
|
+
exports["ɵga"] = IgxGridFilteringModule;
|
|
86586
|
+
exports["ɵgb"] = IgxColumnMovingModule;
|
|
86587
|
+
exports["ɵgc"] = IgxColumnMovingDropDirective;
|
|
86588
|
+
exports["ɵgd"] = IgxColumnMovingDragDirective;
|
|
86589
|
+
exports["ɵge"] = IgxGridResizingModule;
|
|
86590
|
+
exports["ɵgf"] = IgxResizeHandleDirective;
|
|
86591
|
+
exports["ɵgg"] = IgxGridExcelStyleFilteringModule;
|
|
86592
|
+
exports["ɵgh"] = IgxGridSelectionModule;
|
|
86593
|
+
exports["ɵgi"] = IgxGridDragSelectDirective;
|
|
86594
|
+
exports["ɵgj"] = IgxGridSummaryModule;
|
|
86595
|
+
exports["ɵgk"] = IgxSummaryDataPipe;
|
|
86596
|
+
exports["ɵgl"] = IgxGridToolbarModule;
|
|
86597
|
+
exports["ɵgm"] = BaseToolbarDirective;
|
|
86598
|
+
exports["ɵgn"] = BaseToolbarColumnActionsDirective;
|
|
86599
|
+
exports["ɵgo"] = IgxGridRowComponent;
|
|
86600
|
+
exports["ɵgp"] = IgxGridSortingPipe;
|
|
86601
|
+
exports["ɵgq"] = IgxGridGroupingPipe;
|
|
86602
|
+
exports["ɵgr"] = IgxGridPagingPipe;
|
|
86603
|
+
exports["ɵgs"] = IgxGridFilteringPipe;
|
|
86604
|
+
exports["ɵgt"] = IgxGridSummaryPipe;
|
|
86605
|
+
exports["ɵgu"] = IgxGridDetailsPipe;
|
|
86606
|
+
exports["ɵgv"] = IgxGridExpandableCellComponent;
|
|
86607
|
+
exports["ɵgw"] = IgxTreeGridRowComponent;
|
|
86608
|
+
exports["ɵgx"] = IgxTreeGridCellComponent;
|
|
86609
|
+
exports["ɵgy"] = IgxTreeGridHierarchizingPipe;
|
|
86610
|
+
exports["ɵgz"] = IgxTreeGridFlatteningPipe;
|
|
86611
|
+
exports["ɵh"] = IGX_TREE_NODE_COMPONENT;
|
|
86612
|
+
exports["ɵha"] = IgxTreeGridSortingPipe;
|
|
86613
|
+
exports["ɵhb"] = IgxTreeGridPagingPipe;
|
|
86614
|
+
exports["ɵhc"] = IgxTreeGridTransactionPipe;
|
|
86615
|
+
exports["ɵhd"] = IgxTreeGridNormalizeRecordsPipe;
|
|
86616
|
+
exports["ɵhe"] = IgxTreeGridAddRowPipe;
|
|
86617
|
+
exports["ɵhf"] = IgxTreeGridFilteringPipe;
|
|
86618
|
+
exports["ɵhg"] = IgxTreeGridSummaryPipe;
|
|
86619
|
+
exports["ɵhh"] = IgxHierarchicalRowComponent;
|
|
86620
|
+
exports["ɵhi"] = IgxHierarchicalGridCellComponent;
|
|
86621
|
+
exports["ɵhj"] = IgxSliderThumbComponent;
|
|
86622
|
+
exports["ɵhk"] = IgxThumbLabelComponent;
|
|
86623
|
+
exports["ɵhl"] = IgxTicksComponent;
|
|
86624
|
+
exports["ɵhm"] = IgxTickLabelsPipe;
|
|
86625
|
+
exports["ɵhn"] = IgxTabsBase;
|
|
86626
|
+
exports["ɵho"] = IgxTabHeaderBase;
|
|
86627
|
+
exports["ɵhp"] = IgxTabContentBase;
|
|
86628
|
+
exports["ɵhq"] = IgxSplitBarComponent;
|
|
86629
|
+
exports["ɵhr"] = IgxTreeService;
|
|
86630
|
+
exports["ɵhs"] = IgxTreeSelectionService;
|
|
86631
|
+
exports["ɵht"] = IgxTreeNavigationService;
|
|
86632
|
+
exports["ɵi"] = PlatformUtil;
|
|
86633
|
+
exports["ɵl"] = IgxInputGroupBase;
|
|
86634
|
+
exports["ɵm"] = IgxSelectionAPIService;
|
|
86635
|
+
exports["ɵn"] = IgxForOfSyncService;
|
|
86636
|
+
exports["ɵo"] = IgxForOfScrollSyncService;
|
|
86637
|
+
exports["ɵp"] = DisplayContainerComponent;
|
|
86638
|
+
exports["ɵq"] = IgxScrollInertiaDirective;
|
|
86639
|
+
exports["ɵr"] = IgxScrollInertiaModule;
|
|
86640
|
+
exports["ɵs"] = VirtualHelperComponent;
|
|
86641
|
+
exports["ɵt"] = VirtualHelperBaseDirective;
|
|
86642
|
+
exports["ɵu"] = HVirtualHelperComponent;
|
|
86643
|
+
exports["ɵv"] = MaskParsingService;
|
|
86644
|
+
exports["ɵw"] = isHierarchyMatch;
|
|
86645
|
+
exports["ɵx"] = getHierarchy;
|
|
86646
|
+
exports["ɵy"] = IgxGridActionButtonComponent;
|
|
86647
|
+
exports["ɵz"] = ToggleAnimationPlayer;
|
|
86257
86648
|
|
|
86258
86649
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
86259
86650
|
|
|
86260
|
-
}))
|
|
86651
|
+
}));
|
|
86261
86652
|
//# sourceMappingURL=igniteui-angular.umd.js.map
|